I am currently integrating some playbooks to run from AWX: the playbooks used to run from the commandline only, and only one at a time (whereas we have multiple environments). There are some things to adapt to in them, tied to the execution environments or inventory management.
I thus find myself frequently updating my playbook repo, syncing both inventory source and project in AWX and re-launching the job template and this takes time. The AWX web console for getting job outputs is great but also takes time to refresh compared to running Ansible in a single shell on my machine.
My question is thus: what would be the best way to short-cycle this loop while still keeping the specifics of AWX (execution environment, etc)? Ideally, I would have a single command to run over my local playbook git repo to validate my changes and be confident they would run w/o errors when done in AWX. I would tend to think this would be something like ansible-runner but I don’t know which exact arguments to use for it.
After reading more and building a custom execution environment myself (which worked great, thanks for ansible-builder btw!), I am now certain ansible-runner is what I want to use to be able to run jobs on my machine with the same execution environment and parameters than within AWX.
The thing is I cannot manage to find the actual ansible-runner arguments which are used when a job is run. The closest I could get was using the AWX CLI client and finding a related commandline for a job in its job_args variable:
This is one level too deep: it calls directly ansible-playbook and does not describe how the ansible-runner was called. I also don’t know whether it’s the directory input interface (described at https://ansible-runner.readthedocs.io/en/latest/intro/#inputdir) or the commandline which was used.
Would you have any hint? Are you guys using such an interface to debug/run jobs on your workstation?
Yes it’s local dev based. navigator can be used with or without EEs as well. The idea though is to develop and test a custom EE locally but that’s then consistent throughout wherever else it gets used.