diff --git a/roles/edpm_derive_pci_device_spec/tasks/derive_pci_device_spec.yml b/roles/edpm_derive_pci_device_spec/tasks/derive_pci_device_spec.yml index 38fcef962..c7bd7c8ea 100644 --- a/roles/edpm_derive_pci_device_spec/tasks/derive_pci_device_spec.yml +++ b/roles/edpm_derive_pci_device_spec/tasks/derive_pci_device_spec.yml @@ -25,8 +25,8 @@ path: "{{ edpm_derive_pci_device_spec_conf_dir }}" setype: "container_file_t" state: directory - owner: "{{ ansible_user }}" - group: "{{ ansible_user }}" + owner: "{{ ansible_user | default(ansible_user_id) }}" + group: "{{ ansible_user | default(ansible_user_id) }}" mode: "0755" - name: Check if edpm node has the sriov nova conf diff --git a/roles/edpm_extra_mounts/tasks/extra_mounts.yml b/roles/edpm_extra_mounts/tasks/extra_mounts.yml index 840135946..d7f1e4233 100644 --- a/roles/edpm_extra_mounts/tasks/extra_mounts.yml +++ b/roles/edpm_extra_mounts/tasks/extra_mounts.yml @@ -19,8 +19,8 @@ ansible.builtin.file: path: "{{ item.path }}" state: directory - owner: "{{ item.owner | default(omit) }}" - group: "{{ item.group | default(omit) }}" + owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}" mode: "{{ item.mode | default('0775') }}" loop: "{{ edpm_default_mounts }}" tags: diff --git a/roles/edpm_libvirt/tasks/configure.yml b/roles/edpm_libvirt/tasks/configure.yml index a23d327ec..045637c25 100644 --- a/roles/edpm_libvirt/tasks/configure.yml +++ b/roles/edpm_libvirt/tasks/configure.yml @@ -16,8 +16,8 @@ path: "{{ item.path }}" state: directory setype: "{{ item.setype | default('container_file_t') }}" - owner: "{{ item.owner | default(ansible_user) }}" - group: "{{ item.group | default(ansible_user) }}" + owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}" mode: "{{ item.mode | default(omit) }}" loop: - {"path": "/etc/tmpfiles.d/", "owner": "root", "group": "root"} @@ -36,9 +36,8 @@ src: "{{ item.src }}" dest: "/etc/{{ item.dest }}" mode: "{{ item.mode | default('0640') }}" - # FIXME: update to libvirt user/group - owner: "root" - group: "root" + owner: "{{ 'libvirt' | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ 'libvirt' | default(ansible_user) | default(ansible_user_id) }}" loop: - {"src": "virtlogd.conf", "dest": "libvirt/virtlogd.conf"} - {"src": "virtnodedevd.conf", "dest": "libvirt/virtnodedevd.conf"} diff --git a/roles/edpm_neutron_sriov/tasks/install.yml b/roles/edpm_neutron_sriov/tasks/install.yml index 6c6f7e323..315b476b9 100644 --- a/roles/edpm_neutron_sriov/tasks/install.yml +++ b/roles/edpm_neutron_sriov/tasks/install.yml @@ -20,8 +20,8 @@ path: "{{ item.path }}" setype: "container_file_t" state: directory - owner: "{{ item.owner | default(omit) }}" - group: "{{ item.group | default(omit) }}" + owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}" mode: "{{ item.mode | default(omit) }}" loop: - {'path': "/var/lib/openstack/config/containers", "mode": "0755", "owner": "{{ ansible_user }}", "group": "{{ ansible_user }}"} diff --git a/roles/edpm_nova/tasks/configure.yml b/roles/edpm_nova/tasks/configure.yml index 92d25f42a..c07fc0c0e 100644 --- a/roles/edpm_nova/tasks/configure.yml +++ b/roles/edpm_nova/tasks/configure.yml @@ -72,8 +72,8 @@ path: "{{ item.path }}" state: "directory" setype: "container_file_t" - owner: "{{ item.owner | default(ansible_user) }}" - group: "{{ item.group | default(ansible_user) }}" + owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}" mode: "{{ item.mode | default(omit) }}" loop: - {"path": "{{ edpm_nova_config_dest }}", "mode": "0755"} @@ -87,8 +87,8 @@ path: "{{ item.path }}" setype: "container_file_t" state: "directory" - owner: "{{ item.owner | default(omit) }}" - group: "{{ item.group | default(omit) }}" + owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}" mode: "{{ item.mode | default(omit) }}" loop: - {"path": "/var/lib/nova", "mode": "0755"} diff --git a/roles/edpm_swift/tasks/configure.yml b/roles/edpm_swift/tasks/configure.yml index 512610f1a..c98014f83 100644 --- a/roles/edpm_swift/tasks/configure.yml +++ b/roles/edpm_swift/tasks/configure.yml @@ -34,8 +34,8 @@ path: "{{ item.path }}" state: "directory" setype: "container_file_t" - owner: "{{ item.owner | default(ansible_user) }}" - group: "{{ item.group | default(ansible_user) }}" + owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}" mode: "{{ item.mode | default(omit) }}" loop: - {"path": "{{ edpm_swift_config_dest }}", "mode": "0755"} @@ -49,8 +49,8 @@ path: "{{ item.path }}" state: "directory" setype: "container_file_t" - owner: "{{ item.owner | default(ansible_user) }}" - group: "{{ item.group | default(ansible_user) }}" + owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}" mode: "{{ item.mode | default(omit) }}" loop: - {"path": "/srv/node", "mode": "0750", "owner": "swift", "group": "swift"} diff --git a/roles/edpm_users/tasks/main.yml b/roles/edpm_users/tasks/main.yml index 84c22c3d0..87829647d 100644 --- a/roles/edpm_users/tasks/main.yml +++ b/roles/edpm_users/tasks/main.yml @@ -23,8 +23,8 @@ ansible.builtin.file: path: "{{ item.path }}" state: directory - owner: "{{ item.owner | default(omit) }}" - group: "{{ item.group | default(omit) }}" + owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}" + group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}" setype: "{{ item.setype | default(omit) }}" seuser: "{{ item.seuser | default(omit) }}" mode: "{{ item.mode | default(omit) }}"