Per the documentation, the password argument should be an already crypted
password:
Optionally set the user's password to this crypted value
You can use the "password_hash" filter to create an encrypted version such
as:
password="{{ someuser_password|password_hash }}"
On Thursday, June 18, 2015, Jan Duprez <[email protected]> wrote:
> I have a strange issue when setting passwords for a user with the user
> module, it seems to be mangling the password somehow. When i use a plain
> shell command to set the password it does work ...
>
> Code causing the error:
>
> - name: Add user someuser usingAnsible user module
> user: name=someuser password="{{ someuser_password }}"
> groups=someuser,shadow append=yes state=present
>
> Working workaround:
>
> - name: Add user someuser using shell
> shell: (echo "{{ someuser_password }}"; echo "{{ someuser_password }}")
> | sudo passwd someuser
>
>
> Once present the user created does some password-authenticated java
> commands and when i use the erronous code this all fails.
> If i login to the machine manually and update the password while these
> calls are being made by the ansible run i see the commands start succeeding
> again.
>
> The workaround gets me by for now but is not ideal
>
> Sys info
>
> ansible --version
> ansible 1.9.1
> installed from ubuntu repos w apt-get
>
>
> Distributor ID: Ubuntu
> Description: Ubuntu 12.04.5 LTS
> Release: 12.04
> Codename: precise
>
> (yeah i should be updating my ubuntu, i know.. :-)
>
> --
> 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/604aaab7-87c0-469c-8ff7-dad0a14d345a%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/604aaab7-87c0-469c-8ff7-dad0a14d345a%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-2GCPcPnuiyd-wCiSA%3DMpFE1Oe%3DOBPSnNkjcg372GC6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.