The user module expects the password to already be encrypted.  You will
also need to pass encrypt=True to the lookup as well.

On Tuesday, March 1, 2016, Deepa Yr <[email protected]> wrote:

>
> I am running this task
>
> - name: Create users with auto generated password
>   user: name=deepa state=present password="{{ lookup('password',
> '/tmp/deepapassword.txt chars=ascii_letters') }}"
>
> It is creating the file /tmp/deepapassword.txt and I see the password
> But when I try to login as deepa user with that password, it says
> incorrect password.
>
> Any suggestions here ?
>
> My requirement is to create a user with random password and use this user
> credentials in the subsequent tasks.
>
> --
> 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]
> <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/34ab8268-7cee-4543-b4a3-212c4668cc27%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/34ab8268-7cee-4543-b4a3-212c4668cc27%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v-j-u-t3q_RkU91Lf1CdvYChr_DtqDOw-v0XSGsdNfYag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to