Utilize ansible-runner to execute playbooks from jobs/api/... #1281
jifox
started this conversation in
Plugin (App) Ideas & Development
Replies: 1 comment
-
Ansible and Terraform runners #996 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to start a discussion about how to implement a Nautobot plugin that will allow to execute ansible-playbooks from within Nautobot.
I think many network engineers are already using Ansible for (network)-automation. I personally have a lot of playbooks and templates to manage my production network. But currently this is done by executing it from cli commands either manually or via cron.
To be able using Ansible from within Nautobot will allow me to delegate some routine tasks to our first level support by providing a Web GUI and using the authentication/authorization functionality form Nautobot.
As Ansible is already capable of using Nautobot as an inventory source and to query Nautobot for information, it should be possible without much effort to implement a plugin that is triggering ansible to execute specific playbooks.
PoC
I followed the NTC Blog - ansible-builder-runner-ee and managed to get all running.
After that I’ve tested the remote execution as described in section Remote job execution in
ansible-runner
documentation.Ideas
./env/passwords
./env/ssh_key
ansible-runner worker
Containercelery-worker
containers.named-pipes
representing the input and output ofansible-runner worker
. This would replace thessh
command in the PoCLinks
Beta Was this translation helpful? Give feedback.
All reactions