Alternatively, you could look at the `update_password` option for the user module. http://docs.ansible.com/ansible/user_module.html
The default is `always` "`always` will update passwords if they differ. `on_create` will only set the password for newly created users." On Wed, Jun 1, 2016 at 10:07 AM, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 01.06.2016 17:00, Johannes Kastl wrote: > >> On 01.06.16 15:25 Uditha Desilva wrote: >> >>> I believe that's because the password_hash function uses a random seed, >>> so >>> the actual encrypted password will be different each time. >>> >> >> Any idea how to avoid this? >> >> Storing the hash of the password in a variable, instead of the >> non-hashed version? >> > > That's one way, or provide the salt. From > http://docs.ansible.com/ansible/playbooks_filters.html#hashing-filters > {{ 'secretpassword'|password_hash('sha256', 'mysecretsalt') }} > > -- > Kai Stian Olstad > > -- > 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 ansible-project+unsubscr...@googlegroups.com. > To post to this group, send email to ansible-project@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/386b8bfbae48b415f0ba1d83944a4e94%40olstad.com > . > > 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v_Sc296U2imp%2B2zHaJF7o%3DxeZfVPRm0uW9Y2zcmwx0wyA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.