# Credential Module - Create Tower Credential with a Cyberark AIM Lookup as the password

**URL:** <https://forum.ansible.com/t/credential-module-create-tower-credential-with-a-cyberark-aim-lookup-as-the-password/37607>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [February 1, 2023, 9:51pm UTC](https://forum.ansible.com/t/credential-module-create-tower-credential-with-a-cyberark-aim-lookup-as-the-password/37607 "2023-02-01T21:51:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spence](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Spence](https://forum.ansible.com/u/Spence)\
**Post date:** [February 1, 2023, 9:51pm UTC](https://forum.ansible.com/t/credential-module-create-tower-credential-with-a-cyberark-aim-lookup-as-the-password/37607/1 "2023-02-01T21:51:49Z")

</div>

Hello!

I’m looking into creating credentials in Tower using the Ansible tower\_credential module. I can’t find any examples of this module where the password is a lookup/query vs. hard-coding a password.

Presently, I can go into Tower and manually create credentials where the password uses a “Cyberark AIM Central Credential Provider Lookup”, and enter in my object query on the metadata page (for example, Safe=mysafe;Object=mysecret). This does not work for my long term, as our automation is designed to create a new credential when a new team is onboarded to Tower.

Is there any way I can do this with the Ansible credential module? Here is the source code as reference. [https://github.com/ansible/awx/blob/devel/awx\_collection/plugins/modules/credential.py](https://github.com/ansible/awx/blob/devel/awx_collection/plugins/modules/credential.py)

Thanks,  
Spence

---

<div class="post-metadata">

**Author:** ![Spence](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Spence](https://forum.ansible.com/u/Spence)\
**Post date:** [February 1, 2023, 10:49pm UTC](https://forum.ansible.com/t/credential-module-create-tower-credential-with-a-cyberark-aim-lookup-as-the-password/37607/2 "2023-02-01T22:49:55Z")

</div>

Disregard! Found my answer with this module: [https://github.com/ansible/awx/blob/devel/awx\_collection/plugins/modules/credential\_input\_source.py](https://github.com/ansible/awx/blob/devel/awx_collection/plugins/modules/credential_input_source.py)

Thanks,  
Spence
