From e0a6307e1e9cfcb416d8928f51279b6ada27d9d8 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Fri, 6 Oct 2023 14:14:20 +0200 Subject: [PATCH] Fix owner of the /var/lib/openstack created by the neutron_dhcp role This directory may be created by libvirt role or neutron_dhcp role and it had wrong owner set (root) when was created by edpm_neutron_dhcp role. Because of that edpm_libvirt role which was run after edpm_neutron_dhcp was failing due to permission error to access /var/lib/openstack/config/ directory. --- roles/edpm_neutron_dhcp/tasks/install.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/edpm_neutron_dhcp/tasks/install.yml b/roles/edpm_neutron_dhcp/tasks/install.yml index 52620891e..7afefdc9f 100644 --- a/roles/edpm_neutron_dhcp/tasks/install.yml +++ b/roles/edpm_neutron_dhcp/tasks/install.yml @@ -19,13 +19,15 @@ path: "{{ item.path }}" setype: "container_file_t" state: directory + owner: "{{ item.owner | default(ansible_user) }}" + group: "{{ item.group | default(ansible_user) }}" mode: "{{ item.mode | default(omit) }}" loop: - {'path': "/var/lib/openstack/config/containers", "mode": "0750" } - {'path': "/var/lib/neutron", "mode": "0750" } - {'path': "{{ edpm_neutron_dhcp_agent_config_dir }}", "mode": "0755" } - - {'path': "/var/log/containers/stdouts"} - - {'path': "/var/log/containers/neutron"} + - {'path': "/var/log/containers/stdouts", "mode": "0755" } + - {'path': "/var/log/containers/neutron", "mode": "0755" } tags: - install - neutron