fix(semaphore/collections): mount to /opt/ansible-collections, set ANSIBLE_COLLECTIONS_PATHS

/home/semaphore/.ansible/ is owned by root after Podman creates the
bind-mount dir, so ansible-galaxy can't create sibling tmp dirs.
Mount to a neutral /opt/ansible-collections path and point Ansible
at it via ANSIBLE_COLLECTIONS_PATHS env var instead.
This commit is contained in:
Hermes Agent service account
2026-06-07 16:47:15 -05:00
parent 6912f5c55d
commit 644128cd3f
2 changed files with 7 additions and 4 deletions

View File

@@ -30,7 +30,7 @@
podman exec {{ semaphore_container_name }}
{{ ansible_galaxy_bin.stdout }} collection install
{{ item.name }}{% if item.version is defined %}:{{ item.version }}{% endif %}
-p /home/semaphore/.ansible/collections
-p /opt/ansible-collections
--force
loop: "{{ semaphore_ansible_collections }}"
loop_control: