ansible vault and lookups module for password hashes

71 views
Skip to first unread message

Asil Carlin

unread,
Nov 25, 2016, 9:45:03 AM11/25/16
to Ansible Project

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

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


Gives me:

<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:

<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

Message has been deleted

Asil Carlin

unread,
Dec 2, 2016, 6:51:18 AM12/2/16
to Ansible Project
Ended up using git-crypt instead.

Reply all
Reply to author
Forward
0 new messages