From 32fa1f68de0cc9310908838d3992bc42e2c3edc1 Mon Sep 17 00:00:00 2001 From: Dmitriy Chubinidze Date: Tue, 24 Jun 2025 15:15:52 +0000 Subject: [PATCH] Set ANSIBLE_LOCAL_TEMP to /tmp to prevent remote_tmp warnings Configure ANSIBLE_LOCAL_TEMP to avoid permission issues with Ansible temporary directories. This prevents Ansible to issue a Warning that remote_tmp does not exist, as well as avoid potential failures during privelege escalation through become. We already witness failures for molecule with current default for RockyLinux 9 [1] [1] https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/966150 Change-Id: Icb59ab758601096fc4f6c89fbb6d41f156f06d9d Signed-off-by: Dmitriy Chubinidze --- releasenotes/notes/ansible_tmp_folder-469f1f822fd7217a.yaml | 5 +++++ scripts/openstack-ansible.rc | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 releasenotes/notes/ansible_tmp_folder-469f1f822fd7217a.yaml diff --git a/releasenotes/notes/ansible_tmp_folder-469f1f822fd7217a.yaml b/releasenotes/notes/ansible_tmp_folder-469f1f822fd7217a.yaml new file mode 100644 index 0000000000..87da791209 --- /dev/null +++ b/releasenotes/notes/ansible_tmp_folder-469f1f822fd7217a.yaml @@ -0,0 +1,5 @@ +--- +other: + - | + Default value of ``ANSIBLE_LOCAL_TEMP`` was set to ``/tmp`` folder, instead + of the default value ``ANSIBLE_HOME ~ "/tmp"``. diff --git a/scripts/openstack-ansible.rc b/scripts/openstack-ansible.rc index 4c38cb03e2..bdfc387ae1 100644 --- a/scripts/openstack-ansible.rc +++ b/scripts/openstack-ansible.rc @@ -27,6 +27,8 @@ export ANSIBLE_ROLES_PATH="${ANSIBLE_ROLES_PATH:-/etc/ansible/roles:/etc/ansible export ANSIBLE_COLLECTIONS_PATH="${ANSIBLE_COLLECTIONS_PATH:-/etc/ansible}" +export ANSIBLE_LOCAL_TEMP="${ANSIBLE_LOCAL_TEMP:-/tmp}" + export ANSIBLE_LIBRARY="${ANSIBLE_LIBRARY:-/etc/ansible/roles/ceph-ansible/library}" export ANSIBLE_FILTER_PLUGINS="${ANSIBLE_FILTER_PLUGINS:-/etc/ansible/roles/ceph-ansible/plugins/filter}" export ANSIBLE_CALLBACK_PLUGINS="${ANSIBLE_CALLBACK_PLUGINS:-/etc/ansible/roles/ceph-ansible/plugins/callback}"