From fc0e39b9c72a04bd9c83eb91bbffefbbb9d969fd Mon Sep 17 00:00:00 2001 From: Hermes Agent service account Date: Sun, 7 Jun 2026 16:45:16 -0500 Subject: [PATCH] fix(semaphore/collections): use full ansible-galaxy path from Semaphore venv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ansible-galaxy is not on the system PATH on figment — Semaphore manages its own venv under /opt/semaphore/apps/ansible//venv/bin/. Discover the binary dynamically rather than relying on PATH. --- ansible/roles/semaphore/tasks/collections.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ansible/roles/semaphore/tasks/collections.yml b/ansible/roles/semaphore/tasks/collections.yml index 9f6a02d..2d7ee29 100644 --- a/ansible/roles/semaphore/tasks/collections.yml +++ b/ansible/roles/semaphore/tasks/collections.yml @@ -17,10 +17,17 @@ group: root mode: "0755" +- name: Find ansible-galaxy binary on host + ansible.builtin.shell: + cmd: "find /opt/semaphore/apps/ansible -name ansible-galaxy -type f | sort -V | tail -1" + register: ansible_galaxy_bin + changed_when: false + failed_when: ansible_galaxy_bin.stdout == "" + - name: Install Ansible collections into host collections directory ansible.builtin.command: cmd: > - ansible-galaxy collection install + {{ ansible_galaxy_bin.stdout }} collection install {{ item.name }}{% if item.version is defined %}:{{ item.version }}{% endif %} -p {{ semaphore_collections_dir }} --force