Skip to content

Commit

Permalink
Merge pull request #445 from gibizer/create-nova-user
Browse files Browse the repository at this point in the history
[nova]Add nova user to the EDPM host
  • Loading branch information
openshift-ci[bot] authored Oct 16, 2023
2 parents e43d6f5 + 058c100 commit 4162fac
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roles/edpm_nova/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,17 @@
- "Copying /var/lib/kolla/config_files/nova-blank.conf to /etc/nova/nova.conf"
- "Copying /var/lib/kolla/config_files/01-nova.conf to /etc/nova/nova.conf.d/01-nova.conf"
- "Copying /var/lib/kolla/config_files/02-nova-log.conf to /etc/nova/nova.conf.d/02-nova-log.conf"

- name: Check if user exists
ansible.builtin.getent:
database: passwd
key: nova
register: nova_user

- name: Assert that nova user is created with kolla uid and gid
ansible.builtin.assert:
that:
# user
- "nova_user.ansible_facts.getent_passwd.nova[1] == '42436'"
# group
- "nova_user.ansible_facts.getent_passwd.nova[2] == '42436'"
11 changes: 11 additions & 0 deletions roles/edpm_nova/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,14 @@
loop: "{{ edpm_nova_configmaps.files }}"
notify:
- Restart nova

- name: Configure nova user and group on the host
ansible.builtin.import_role:
name: edpm_users
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"}
edpm_users_extra_dirs: []
tags:
- edpm_users

0 comments on commit 4162fac

Please sign in to comment.