Hello, all.

A while ago, I created a quck-'n-dirty user creation playbook.  With the 
following line, I was able to both create the user, and his/her encrypted 
password (for CentOS 6/7):

user: name="someuser" password={{ 'somepassword'|password_hash('sha512', 
'mSFRM"N4') }} state=present

Now, I want to user "user" and password" vars in the play, rather than have 
to add them in the line above.  Here's what I've come up with:

vars:
   user: someuser
   password: somepassword

tasks:
   - name: create user in Centos 6
     user: name={{ user }} password={{ '{{ password 
}}'|password_hash('sha512', 'ies8Aech') }} state=present

With the above, while the user is created, the password doesn't work.  Help 
would be appreciated.

Dimitri

-- 
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/1fb57182-7583-48ca-bee7-2196ffb330b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to