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