# Does anyone have examples of running CasC as a template on AAP?

**URL:** <https://forum.ansible.com/t/does-anyone-have-examples-of-running-casc-as-a-template-on-aap/6690>\
**Category:** Get Help\
**Tags:** azure, infra-config-as-code, ansible-navigator, aap\
**Created:** [June 20, 2024, 9:16pm UTC](https://forum.ansible.com/t/does-anyone-have-examples-of-running-casc-as-a-template-on-aap/6690 "2024-06-20T21:16:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karyn\_Cassio](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/karyn_cassio/32/3930_2.png) [@Karyn\_Cassio](https://forum.ansible.com/u/Karyn_Cassio)\
**Post date:** [June 20, 2024, 9:16pm UTC](https://forum.ansible.com/t/does-anyone-have-examples-of-running-casc-as-a-template-on-aap/6690/1 "2024-06-20T21:16:42Z")

</div>

My current customer doesn’t have a bastion host, and we are setting up CasC POC for them. They access their instance of AAP using an Azure token. When I run a task from the CasC playbook I get auth errors, which is expected since I don’t have a defined username/password to pass to the controller.

Any thoughts on how I could proceed with this situation and get a playbook that actually runs? Or is it by design meant to run with `ansible-playbook` or `ansible-navigator` from the command line?

Thank you for you thoughts on this

---

<div class="post-metadata">

**Author:** ![laurent-indermuehle](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/laurent-indermuehle/32/289_2.png) [@laurent-indermuehle](https://forum.ansible.com/u/laurent-indermuehle)\
**Post date:** [June 21, 2024, 1:29pm UTC](https://forum.ansible.com/t/does-anyone-have-examples-of-running-casc-as-a-template-on-aap/6690/2 "2024-06-21T13:29:30Z")

</div>

Hi @Karyn_Cassio,  
What do you mean by “I run a task from the CasC”? Is it a job template that you launch from the controller’s webui?

If yes, then it may be just a matter of a missing “credential” that must be added on the project or job template.

---

<div class="post-metadata">

**Author:** ![Karyn\_Cassio](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/karyn_cassio/32/3930_2.png) [@Karyn\_Cassio](https://forum.ansible.com/u/Karyn_Cassio)\
**Post date:** [June 24, 2024, 5:56pm UTC](https://forum.ansible.com/t/does-anyone-have-examples-of-running-casc-as-a-template-on-aap/6690/3 "2024-06-24T17:56:58Z")

</div>

Got it all figured out. Thanks for the input @laurent-indermuehle

---

<div class="post-metadata">

**Author:** ![J00p34](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@J00p34](https://forum.ansible.com/u/J00p34)\
**Post date:** [July 24, 2024, 9:45am UTC](https://forum.ansible.com/t/does-anyone-have-examples-of-running-casc-as-a-template-on-aap/6690/4 "2024-07-24T09:45:24Z")

</div>

Hi @Karyn_Cassio can you maybe share your setup? I’m trying to do something similar (configuring the controller from a template in the controller) but I can’t seem to get it working. I’m importing the ansible.controller collection (tried awx.awx also) but the roles are not found
