Hi,

I am trying to create an user with password hash filter like this:

- name: Create a user
  user: 
     name: abc
     group: xyz
     password: {{ 'mypass'|password_hash('sha256', 'mysalt') }}


This works!
Now I would like to use variables in place of 'mypass' and 'mysault' that 
are defined in vars/main.yml (encrypted by vault)

---
password: 'mypass'
password_sault: 'mysault'

so the playbook would look like this:

- name: Create a user
  user: 
     name: abc
     group: xyz
     password: {{ '{{password}}'|password_hash('sha256', 
'{{password_sault}}') }}

However this doesn't really work. What's the right way to do this?
Thanks.

David


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/01dd94fb-863f-4e93-84be-4b405e0502e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to