17 lines
527 B
YAML
17 lines
527 B
YAML
---
|
|||
|
|
- name: Emergency Password Reset
|
||
|
|
hosts: all
|
||
|
|
become: yes
|
||
|
|
tasks:
|
||
|
|
- name: Force reset root password to something known
|
||
|
|
ansible.builtin.user:
|
||
|
|
name: root
|
||
|
|
# Replace 'TemporaryPassword123' with your desired plain text password
|
||
|
|
password: "{{ 'xxx' | password_hash('sha512', 'mycustomsalt') }}"
|
||
|
|
shell: /bin/bash
|
||
|
|
|
||
|
|
- name: Force reset your main user password
|
||
|
|
ansible.builtin.user:
|
||
|
|
name: volker
|
||
|
|
password: "{{ 'xxx' | password_hash('sha512', 'mycustomsalt') }}"
|