Added playbook to change admin password + updated vault pass
This commit is contained in:
parent
578b0eacee
commit
74d9df34ad
13
home_linux/change_password.yml
Normal file
13
home_linux/change_password.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
# 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') }}"
|
||||
18
home_linux/roles/common/vars/main.yml
Executable file → Normal file
18
home_linux/roles/common/vars/main.yml
Executable file → Normal file
@ -1,10 +1,10 @@
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
34323466633533666237623830316138373237326134336236613536633664373564633163613230
|
||||
3938393338663632613061646365613630373635613536360a613039306363616432633030306334
|
||||
33353839346339393965616234323561306338626533363238306662383938626364303061633332
|
||||
6230623361393438610a383230376431373034306331376536313831633366373665393866373338
|
||||
65313334623131323931353436623265623033396266623364313934383865386532623630336164
|
||||
32653432613065303363303730353864353739633530376637333662303134613339353062303932
|
||||
33646466383561373264333734626364663763393766666664653365386230393562626563376265
|
||||
63303939363932636266303566363062643166343064343762313339353839326361383062653036
|
||||
6232
|
||||
31373666386334376331316561663830613065303332353965306334613165396261663564393937
|
||||
6365613862623531356333613266346637663333613964330a323664323932626166623161663431
|
||||
62333230373733643261613364626635613162363464366361643737636633336362383465643635
|
||||
3261366564663333620a396136303364376461323233616361633166653063623233383638353033
|
||||
37336439366533316262363761303730313039353038333636326330623261306633303630623463
|
||||
39313238353965666638323262666231386238663262353036313334623565373232623563613935
|
||||
61313461333961363061323166616162376132643531376162383431666436666463346161653032
|
||||
64653435636661313164663964343162313163616531313535613630626364303963396433666431
|
||||
3631
|
||||
|
||||
Loading…
Reference in New Issue
Block a user