Best practice to change root pass

54 views
Skip to first unread message

Daniel Cure

unread,
Jul 31, 2017, 5:10:01 PM7/31/17
to Ansible Project
hi peole thanks so much for your kindly help. Im mew here and i hope to help so much. Im just learning ansible and im new to this but im going to learn fast. My question is, do you what is the best method for changing root password  in linux redhat env. Thanks a lot dear people.

Sorry my bad english, regards.

Cev Ing

unread,
Aug 1, 2017, 3:43:39 AM8/1/17
to Ansible Project


Am Montag, 31. Juli 2017 23:10:01 UTC+2 schrieb Daniel Cure:
what is the best method for changing root password  in linux redhat env.


Probably the user module.


But the problem with the user module is, that it is quite hard the debug.

You can try this:

- name: Update Root password
  user:
    name: root
    uid: 0
    gid: 0
    shell: /bin/bash
    password: "{{root_password_hash}}"
    home: /root
    update_password: always
    state: present

Set the variable root_passoword_hash in a vault file.

Daniel Cure

unread,
Aug 3, 2017, 11:39:12 PM8/3/17
to ansible...@googlegroups.com
Hello my dear friend. I really appreciate what you did. I'm so glad and I hope could help in this group as soon as learn.. Thanks you so much for your kindly help. 

Please let me know if I can help with anything. 

Regards 

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/uJOQJkCSFrE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscribe@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/77af90bb-34d9-4644-95e3-f6782b065d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages