# ansible vault and lookups module for password hashes

**URL:** <https://forum.ansible.com/t/ansible-vault-and-lookups-module-for-password-hashes/23099>\
**Category:** Ansible Project\
**Created:** [November 25, 2016, 2:45pm UTC](https://forum.ansible.com/t/ansible-vault-and-lookups-module-for-password-hashes/23099 "2016-11-25T14:45:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asil](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Asil](https://forum.ansible.com/u/Asil)\
**Post date:** [November 25, 2016, 2:45pm UTC](https://forum.ansible.com/t/ansible-vault-and-lookups-module-for-password-hashes/23099/1 "2016-11-25T14:45:03Z")

</div>

Is this possible? Lookups will work on an un-encrytped file but the following example on a vaulted file:

```auto

root_passwd_hash: "{{ lookup('csvfile', 'root file=vault/pw_hash.csv' ) }}"

```

Gives me:

```auto

<propval type="astring" name="password" value="[]"/>

```

Perhaps I’m going about this the wrong way? I’m using this in a jinja template which has the following line:

```auto

<propval type="astring" name="password" value="{{ sol_ai_profile_user.root_passwd_hash | mandatory }}"/>

```

It makes no difference if I provide the vault password on the command line, in a file, or not bother at all. The play still runs but the var never gets the lookup goodies.

Master: ansible 2.1.1.0

jinja 2.8

Centos 7.2.1511

Python 2.7.5

---

<div class="post-metadata">

**Author:** ![Asil](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Asil](https://forum.ansible.com/u/Asil)\
**Post date:** [December 2, 2016, 11:51am UTC](https://forum.ansible.com/t/ansible-vault-and-lookups-module-for-password-hashes/23099/2 "2016-12-02T11:51:18Z")

</div>

Ended up using git-crypt instead.

[https://github.com/AGWA/git-crypt](https://github.com/AGWA/git-crypt)
