Replies: 2 comments
-
Answering my own question here, although I guess I feel it's a bit of a hack to make this work ... As described in the initial issue, Semaphore ran the playbook against localhost as root, which I don't think is right. To fix this, in your inventory (static, static yaml, file), add the following (assuming the user running the playbooks is
Then, in the root of the directory in which you're running the playbook(s), create an ansible.cfg file with the following contents:
Of course, check that your collections exist in the above mentioned directory. If they're not there, but somewhere else, change the patch accordingly. Side note: I discovered that my Ansible Core installation is old, running on Rocky Linux 9, and it appears that there's no repository I've found that actually provides RPM packages for newer versions of Ansible. Very disappointing. If anyone has any input/comments on the above, please let me know. |
Beta Was this translation helpful? Give feedback.
-
@mlanner You can provide username if SSH access key and it will be used for connection to the server(s). |
Beta Was this translation helpful? Give feedback.
-
Issue
I'm deploying machines in Azure. If I run my playbooks from the CLI, it works fine. With
-vvvv
used on both CLI and in Semaphore I do see a discrepancy in which user is trying to connect. It looks as follows:Running from CLI (working):
Running from Semaphore (fails):
How can I make Semaphore run as the
semaphore
user (instead ofroot
), as semaphore is the user's home dir in which the playbooks are located?Impact
Ansible (task execution)
Installation method
Package
Database
MySQL
Browser
Firefox
Semaphore Version
2.10.35
Ansible Version
Logs & errors
No response
Manual installation - system information
Linux semaphore 5.14.0-427.40.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 16 14:57:47 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Configuration
WebUI configuration:
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions