Autopassword is too smart for me
This commit is contained in:
parent
2e0bb20110
commit
3261933cb0
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
- name: Generate password
|
# - name: Generate password
|
||||||
delegate_to: localhost
|
# delegate_to: localhost
|
||||||
shell: bash autopassword.sh {{ inventory_hostname }}
|
# shell: bash autopassword.sh {{ inventory_hostname }}
|
||||||
register: genPass
|
# register: genPass
|
||||||
|
|
||||||
- name: Backup ssh config
|
- name: Backup ssh config
|
||||||
fetch:
|
fetch:
|
||||||
@ -78,11 +78,11 @@
|
|||||||
user:
|
user:
|
||||||
name: root
|
name: root
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
password: "{{ genPass.stdout | password_hash('sha512') }}"
|
password: "{{ password | password_hash('sha512') }}"
|
||||||
|
|
||||||
- name: Change admin password
|
- name: Change admin password
|
||||||
user:
|
user:
|
||||||
name: "{{ ansible_user }}"
|
name: "{{ ansible_user }}"
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
password: "{{ genPass.stdout | password_hash('sha512') }}"
|
password: "{{ password | password_hash('sha512') }}"
|
||||||
become: yes
|
become: yes
|
||||||
|
Loading…
Reference in New Issue
Block a user