# Fetch password and username value from Tower credentials.

**URL:** <https://forum.ansible.com/t/fetch-password-and-username-value-from-tower-credentials/25166>\
**Category:** Ansible Project\
**Created:** [August 2, 2017, 2:40pm UTC](https://forum.ansible.com/t/fetch-password-and-username-value-from-tower-credentials/25166 "2017-08-02T14:40:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akku](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@Akku](https://forum.ansible.com/u/Akku)\
**Post date:** [August 2, 2017, 2:40pm UTC](https://forum.ansible.com/t/fetch-password-and-username-value-from-tower-credentials/25166/1 "2017-08-02T14:40:16Z")

</div>

Is it possible to declare a variable in the playbook which fetch the value from Ansible tower credentials?

example :

- hosts: "{{ target }}’  
var:  
passwd "{{ password }}’  
user “{{ username }}”

tasks  
-name install apache

I need here the playbook to fetch passwd and user variable value from Tower credentials. Is there any way to do this ?

---

<div class="post-metadata">

**Author:** ![Akku](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@Akku](https://forum.ansible.com/u/Akku)\
**Post date:** [August 3, 2017, 8:22am UTC](https://forum.ansible.com/t/fetch-password-and-username-value-from-tower-credentials/25166/2 "2017-08-03T08:22:39Z")

</div>

We can use

ansible\_ssh\_user  
ansible \_ssh\_pass
