On 09. okt. 2016 21:18, David Li wrote:
---
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.

Curly brackets doesn't stack, just use the variable directly without quotes.

password: "{{ password | password_hash('sha256', password_sault) }}"

--
Kai Stian Olstad

--
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/7dda20ed-4bba-ea5b-7157-c8cd8e55d05f%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to