# How to shorten my playbooks AWX adaptation development cycle loop?

**URL:** <https://forum.ansible.com/t/how-to-shorten-my-playbooks-awx-adaptation-development-cycle-loop/36033>\
**Category:** AWX Project\
**Tags:** awx, ee\
**Created:** [November 25, 2021, 8:39am UTC](https://forum.ansible.com/t/how-to-shorten-my-playbooks-awx-adaptation-development-cycle-loop/36033 "2021-11-25T08:39:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Rubiolo](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vincent\_Rubiolo](https://forum.ansible.com/u/Vincent_Rubiolo)\
**Post date:** [November 25, 2021, 8:39am UTC](https://forum.ansible.com/t/how-to-shorten-my-playbooks-awx-adaptation-development-cycle-loop/36033/1 "2021-11-25T08:39:22Z")

</div>

Greetings everyone,

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.

Would you have any suggestions?

Thanks for your help,

Vincent

---

<div class="post-metadata">

**Author:** ![Vincent\_Rubiolo](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vincent\_Rubiolo](https://forum.ansible.com/u/Vincent_Rubiolo)\
**Post date:** [November 30, 2021, 1:02pm UTC](https://forum.ansible.com/t/how-to-shorten-my-playbooks-awx-adaptation-development-cycle-loop/36033/2 "2021-11-30T13:02:37Z")

</div>

Hi again everyone,

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:

“job\_args”: “["ssh-agent", "sh", "-c", "trap ‘rm -f /runner/artifacts/112/ssh\_key\_data’ EXIT && ssh-add /runner/artifacts/112/ssh\_key\_data && rm -f /runner/artifacts/112/ssh\_key\_data && ansible-playbook -u root --become-method  
sudo -i /runner/inventory/hosts -e @/runner/env/extravars ansible/vrubiolo-playbook.yaml"]”,

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](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?

Thanks for your input here,

Vincent

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [December 1, 2021, 10:27am UTC](https://forum.ansible.com/t/how-to-shorten-my-playbooks-awx-adaptation-development-cycle-loop/36033/3 "2021-12-01T10:27:25Z")

</div>

Hi Vincent.

You are looking at using the wrong tool. Have a look at [https://github.com/ansible/ansible-navigator](https://github.com/ansible/ansible-navigator) which is designed to do this.

Phil.

---

<div class="post-metadata">

**Author:** ![Vincent\_Rubiolo](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vincent\_Rubiolo](https://forum.ansible.com/u/Vincent_Rubiolo)\
**Post date:** [December 1, 2021, 10:51pm UTC](https://forum.ansible.com/t/how-to-shorten-my-playbooks-awx-adaptation-development-cycle-loop/36033/4 "2021-12-01T22:51:27Z")

</div>

Hi Phil,

Thanks for the pointer, I did not know this existed, I will take a look at it, it seems very interesting.

Can you confirm the playbooks run locally and not via a connected AWX instance? This was not fully obvious to me when watching the YT video.

Vincent

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [December 2, 2021, 11:49am UTC](https://forum.ansible.com/t/how-to-shorten-my-playbooks-awx-adaptation-development-cycle-loop/36033/5 "2021-12-02T11:49:15Z")

</div>

Hi Vincent.

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.

Phil.

---

<div class="post-metadata">

**Author:** ![Vincent\_Rubiolo](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vincent\_Rubiolo](https://forum.ansible.com/u/Vincent_Rubiolo)\
**Post date:** [December 6, 2021, 9:14am UTC](https://forum.ansible.com/t/how-to-shorten-my-playbooks-awx-adaptation-development-cycle-loop/36033/6 "2021-12-06T09:14:59Z")

</div>

Thank you Phil. The idea of being able to test locally a custom EE is definitely appealing to me, this is what I am looking for!

Vincent
