Skip to content

Commit

Permalink
Merge pull request #470 from gibizer/add-nova-to-libvirt-group
Browse files Browse the repository at this point in the history
[edpm_nova]Add nova user to libvirt group
  • Loading branch information
openshift-ci[bot] authored Oct 25, 2023
2 parents 93b6486 + 2d6f24d commit 50b3d89
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions roles/edpm_nova/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@
# group
- "nova_user.ansible_facts.getent_passwd.nova[2] == '42436'"

- name: Lookup libvirt group
ansible.builtin.getent:
database: group
key: libvirt
register: libvirt_group

- name: Assert that nova is in the libvirt group
ansible.builtin.assert:
that:
# 2: the users in the group
- "'nova' in libvirt_group.ansible_facts.getent_group.libvirt[2]"

- name: Stat /home/nova/.ssh/authorized_keys
become: true
ansible.builtin.stat:
Expand Down
2 changes: 1 addition & 1 deletion roles/edpm_nova/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
vars:
edpm_users_users:
# 42436 is matching with the uid and gid created by kolla in the nova containers
- {"name": "nova", "uid": "42436", "gid": "42436", "shell": "/bin/sh", "comment": "nova user"}
- {"name": "nova", "uid": "42436", "gid": "42436", "shell": "/bin/sh", "comment": "nova user", "groups": "libvirt"}
edpm_users_extra_dirs: []
tags:
- edpm_users
Expand Down

0 comments on commit 50b3d89

Please sign in to comment.