You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a playbook in Semaphore using a non-main branch (e.g. fixing issue XX), the host_vars are not read from the checked-out branch, but instead from the main branch.
Environment
Semaphore version:
Tested on v2.13.13 and v2.14.7 (latest)
Ansible: Default bundled version
SEMAPHORE_TMP_PATH: /tmp/semaphore/
Observed Behavior
When using branch fixing issue XX, Semaphore creates:
/tmp/semaphore/project_1/repository_1_template_16_inventory_1 → points to branch main
/tmp/semaphore/project_1/repository_3_template_16 → points to branch fixing issue XX
The inventory is loaded from the main branch, not from the working branch where updated host_vars live.
Problem
Even though I have modified host_vars/sync01.yaml in fixing issue XX, Semaphore still uses the outdated version from main.
Expected Behavior
The host_vars (and group_vars) should be read from the currently selected Git branch for the playbook, not defaulted from main.
Steps to Reproduce
Create a new branch fixing issue XX from main
Modify a host_vars/.yaml file
Push the branch and configure a template to use it
Run the template
Workaround Tried
Manually verified the correct file exists in repository_3_template_16
Confirmed that inventory path points to another directory tied to main
Upgraded to latest Semaphore v2.14.7 — issue persists
📎 Additional Notes
This breaks playbook behavior that depends on up-to-date variables.
Makes it difficult to test features in Git branches without merging into main.
Issue
Bug Description
When running a playbook in Semaphore using a non-main branch (e.g. fixing issue XX), the host_vars are not read from the checked-out branch, but instead from the main branch.
Environment
Semaphore version:
Tested on v2.13.13 and v2.14.7 (latest)
Ansible: Default bundled version
SEMAPHORE_TMP_PATH: /tmp/semaphore/
Observed Behavior
When using branch fixing issue XX, Semaphore creates:
/tmp/semaphore/project_1/repository_1_template_16_inventory_1 → points to branch main
/tmp/semaphore/project_1/repository_3_template_16 → points to branch fixing issue XX
The inventory is loaded from the main branch, not from the working branch where updated host_vars live.
Problem
Even though I have modified host_vars/sync01.yaml in fixing issue XX, Semaphore still uses the outdated version from main.
Expected Behavior
The host_vars (and group_vars) should be read from the currently selected Git branch for the playbook, not defaulted from main.
Steps to Reproduce
Create a new branch fixing issue XX from main
Modify a host_vars/.yaml file
Push the branch and configure a template to use it
Run the template
Workaround Tried
Manually verified the correct file exists in repository_3_template_16
Confirmed that inventory path points to another directory tied to main
Upgraded to latest Semaphore v2.14.7 — issue persists
📎 Additional Notes
This breaks playbook behavior that depends on up-to-date variables.
Makes it difficult to test features in Git branches without merging into main.
Impact
Ansible (task execution)
Installation method
Docker
Database
Postgres
Browser
Chrome
Semaphore Version
v2.14.7
Ansible Version
Logs & errors
VARIABLE IS NOT DEFINED
Manual installation - system information
No response
Configuration
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: