Fall back to a derived git URL when a tech role's local path is missing #6

Merged
sysadmin merged 3 commits from fix/tech-role-git-fallback into main 2026-10-06 15:41:03 +00:00
Contributor

Found while testing the Semaphore task template: Play 2's "install roles from local path" step assumed every silvarion.* role/collection source path exists on the machine running ansible-playbook. True for an operator's own dev checkout, never true for a headless runner -- confirmed live, it tried ansible-galaxy collection install /mnt/d/Users/.../ansible-collections/silvarion.provision (etc.) and failed outright for every role.

Now checks existence first and falls back to installing from a derived git URL (https://git.silvarion.org/ansible-collections/<namespace>.<collection>.git), matching the same org/naming convention already confirmed on silvarion.provision's own git_url. No data-model change needed in any leaf/platform file.

🤖 Generated with Claude Code

https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp

Found while testing the Semaphore task template: Play 2's "install roles from local path" step assumed every silvarion.* role/collection source path exists on the machine running ansible-playbook. True for an operator's own dev checkout, never true for a headless runner -- confirmed live, it tried `ansible-galaxy collection install /mnt/d/Users/.../ansible-collections/silvarion.provision` (etc.) and failed outright for every role. Now checks existence first and falls back to installing from a derived git URL (`https://git.silvarion.org/ansible-collections/<namespace>.<collection>.git`), matching the same org/naming convention already confirmed on silvarion.provision's own git_url. No data-model change needed in any leaf/platform file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp
Fall back to a derived git URL when a tech role's local path is missing
All checks were successful
Ansible Lint / ansible-lint (pull_request) Successful in 48s
5c35ed3bda
Play 2's "install roles from local path" step assumed every
silvarion.*'s ansible_roles_list source path exists on the machine
running ansible-playbook -- true for an operator's own dev checkout,
never true for a headless runner. Confirmed live via Semaphore: it tried
to ansible-galaxy install /mnt/d/Users/.../ansible-collections/
silvarion.provision (etc.), which doesn't exist inside the container,
and failed outright for every role.

Checks existence first now and falls back to installing from
https://git.silvarion.org/ansible-collections/<namespace>.<collection>.git
when the local path is absent -- derived from the FQCN, matching the
same org/naming convention already confirmed on silvarion.provision's
own git_url. No data-model change needed in any leaf/platform file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp
Make the collections org base URL a variable, not hardcoded
All checks were successful
Ansible Lint / ansible-lint (pull_request) Successful in 56s
824c0b3924
playbook_ansible_collections_url_prefix (default:
https://git.silvarion.org/ansible-collections), overridable via -e,
instead of baking the URL into the git-fallback task directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp
Drop the default for playbook_ansible_collections_url_prefix
All checks were successful
Ansible Lint / ansible-lint (pull_request) Successful in 44s
65b28364d4
No baked-in default -- supply it wherever the git-fallback path is
actually needed (e.g. as a Semaphore Environment group variable), same
undef(hint=...) fail-fast pattern as playbook_env_source.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012icUrjv3vgHtovVpHUFjdp
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ansible-collections/silvarion.provision!6
No description provided.