user module update_password changing password to and unknown value

389 views
Skip to first unread message

chrono

unread,
Apr 26, 2016, 3:57:47 PM4/26/16
to Ansible Project
Hello Everyone,

I'm trying to change the password of an ID on a few different servers.  The result of my playbook says that each of the servers were "changed" however I am unable to login with the new password OR the old password.

Here is the playbook:

---
- name: Change blahuser password
  hosts: "{{host_group}}"
  sudo: true
#  become_user: blahuser  #Become did not work, I kept getting a permission denied
#  become_method: sudo    
  remote_user: blahuser
  vars_files:
    - '/HOME/PATH/ansible/inventory/web/group_vars/all-servers.yml'
  tasks:
  - name: change blahuser password
    user: name=blahuser update_password=always password="{{pass}}"  #Pass variable is encrypted and stored in all-servers.yml

 Here is the command  I used:

ansible-playbook -i /HOME/PATH/ansible/inventory/web/hosts updatePassword.yml -e "host_group=dev" -vvvv -K


As I mentioned, it seems that the playbook ran and changed the password, but I have no idea what it was changed to.

Any help would be greatly appreciated.

- C



Matt Davis

unread,
Apr 26, 2016, 7:52:31 PM4/26/16
to Ansible Project
Depending on what you're trying to set the password on, most things expect a crypted value. See user module docs and http://docs.ansible.com/ansible/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module.
Reply all
Reply to author
Forward
0 new messages