Can someone give me a hint/example how this works: password={{ initial_password }}
I don’t get it how that {{ initial_password }} part works.
Thanks.
Can someone give me a hint/example how this works: password={{ initial_password }}
I don’t get it how that {{ initial_password }} part works.
Thanks.
I’m using it in a task like this:
And the variable initial_password is defined in a variable file:
initial_password: ‘sOmEcOdE’
‘sOmEcOdE’ is the result of a command line like this:
python -c ‘import crypt; print crypt.crypt(“firstpassword”, “someSalt”)’
A bit hidden, but this is also shown in a few places in the docs, including the password parameter docs for the user module:
http://www.ansibleworks.com/docs/modules.html#user
openssl passwd -salt -1
So no need for the Python code for those that might find that uncomfortable or hard to remember.