-
Bug
-
Resolution: Done-Errata
-
Major
-
rhos-18.0.0
-
1
-
False
-
-
False
-
Committed
-
No Docs Impact
-
openstack-ansibleee-operator-bundle-container-1.0.0-22
-
Committed
-
No impact
-
None
-
Release Note Not Required
-
-
-
-
Critical
currently edpm_neutron_metadata and edpm_neutron_dhcp
are using the following logic to determin the default ownership of files created on the edpm node.
owner: "{{ item.owner | default(lookup('pipe', 'whoami')) }}"
group: "{{ item.group | default(lookup('pipe', 'whoami')) }}"
this is incorect as lookup plugins execution on the ansibale contoler not the target host
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pipe_lookup.html#notes
so this is lookup the user the ansible execution envionment container is runing as not the user it is connected to the host host with.
this should either be using the ansible_user connection variable
owner: "{{ item.owner | default(ansible_user) }}"
group: "{{ item.group | default(ansible_user) }}"
or for a more portable version that works with molecule podman/delegated driver
you can use ansible_user_id __ which is available after you have gathered facts
owner: "{{ item.owner | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user_id) }}"
you can even cascade the defaulting to have ansible_user take precendece if we want but they should be the same if both are present.
owner: "{{ item.owner | default(ansible_user) | default(ansible_user_id) }}"
group: "{{ item.group | default(ansible_user) | default(ansible_user_id) }}"
using a lookup plugin is always wrong in this context.
- links to
-
RHBA-2024:135530 OpenStack Operators
- mentioned in
-
Page Loading...
- mentioned on