14 lines
494 B
YAML
14 lines
494 B
YAML
---
|
|
# Run this script with -> ansible-playbook -i home-inventory.yml change_password.yml --extra-vars 'new_password=XXXXXXX' --ask-vault-pass
|
|
- name: Change the admin password for all hosts (remember to edit the vars.yml file afterwards with the new pass!!!)
|
|
hosts: all
|
|
become: yes
|
|
roles:
|
|
- common
|
|
tasks:
|
|
- name: Change user password
|
|
user:
|
|
name: "{{ ansible_user }}"
|
|
update_password: always
|
|
password: "{{ new_password | password_hash('sha512') }}"
|