From d1ae5ba7a090ab77acb0724db8861da8dc1510db Mon Sep 17 00:00:00 2001 From: Hermes Agent service account Date: Sun, 7 Jun 2026 16:48:45 -0500 Subject: [PATCH] fix(semaphore/collections): set collections dir owner to semaphore container uid (1001) Host dir was owned by root (0755), blocking writes from uid=1001 inside the container. Set owner to semaphore_container_uid=1001 so podman exec can write collections into the bind-mount. --- ansible/roles/semaphore/defaults/main.yml | 5 +++++ ansible/roles/semaphore/tasks/collections.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ansible/roles/semaphore/defaults/main.yml b/ansible/roles/semaphore/defaults/main.yml index 51afad1..5511e4f 100644 --- a/ansible/roles/semaphore/defaults/main.yml +++ b/ansible/roles/semaphore/defaults/main.yml @@ -83,6 +83,11 @@ semaphore_quadlet_dir: /etc/containers/systemd # container restarts and rebuilds. semaphore_collections_dir: /opt/semaphore/ansible-collections +# UID of the semaphore user inside the container (uid=1001). +# The host-side collections directory must be owned by this UID so the +# container process can write collections into the bind-mount. +semaphore_container_uid: 1001 + semaphore_ansible_collections: - name: containers.podman version: ">=1.10.0" diff --git a/ansible/roles/semaphore/tasks/collections.yml b/ansible/roles/semaphore/tasks/collections.yml index 8b7c082..7e59bbb 100644 --- a/ansible/roles/semaphore/tasks/collections.yml +++ b/ansible/roles/semaphore/tasks/collections.yml @@ -13,7 +13,7 @@ ansible.builtin.file: path: "{{ semaphore_collections_dir }}" state: directory - owner: root + owner: "{{ semaphore_container_uid }}" group: root mode: "0755"