change_root_password.yaml 569 B

12345678910111213141516171819202122
  1. ---
  2. - name: Change root's password
  3. hosts: all
  4. gather_facts: false
  5. become: true
  6. #vars_files:
  7. tasks:
  8. - name: "Import variables from include/root_user/root.userinfo.yaml"
  9. include_vars:
  10. dir: "include/root_user"
  11. ignore_unknown_extensions: True
  12. extensions: [ 'userinfo.yaml', 'yaml' ]
  13. - name: "Perform password change on root user"
  14. user:
  15. name: "root"
  16. password: "{{ shadowhash }}"
  17. password_expire_max: 0
  18. password_expire_min: 0
  19. password_lock: false
  20. update_password: always