I use Ansible 2.12.9 hosted on a Debian 11 server, and after installed and configured Semaphore (GUI), i ask myself some questions about best practicing :
[ANSIBLE] : 1) I used to store my projects folders (from local git) into /srv/. Is there any other convenient place for that ?
[ANSIBLE] : 2) i actually launch playbook manually depends on the needs using my AD account. Is there a best practice about launching it through a service account or is it not advised ?
[Ansible/Semaphore] )3) i succeed to configure and run my playbooks on Semaphore, but it seems that they're launched like "sudo" user. i.e if i manually launch ansible-playbook -i my_inventory my_playbook.yml => it works. If i launch the same playbook through Semaphore, it raises an
ERROR! couldn't resolve module/action 'my_collection_name'.
After digging into the configuration, i saw that collection are stored in a different path depends on i launch playbook with my account or sudo. By the way, it seems that semaphore launch it as a sudoers. Is there any best practices about handling collection or module location ?
Thanks for advising.
0 Answers