Deploy root password
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
8c4684a450
commit
145dccac2d
@ -5,3 +5,6 @@ glob_apt:
|
||||
extra_repositories: []
|
||||
pin:
|
||||
bullseye: []
|
||||
|
||||
glob_root:
|
||||
passwd_hash: '{{ vault.root_passwd_hash }}'
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
|
||||
- import_playbook: root.yml
|
||||
- import_playbook: apt.yml
|
||||
- import_playbook: ntp.yml
|
||||
- import_playbook: ldap-client.yml
|
||||
|
7
plays/root.yml
Executable file
7
plays/root.yml
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env ansible-playbook
|
||||
---
|
||||
- hosts: debian
|
||||
vars:
|
||||
root: "{{ glob_root | default({}) | combine(loc_root | default({})) }}"
|
||||
roles:
|
||||
- root
|
6
roles/root/tasks/main.yml
Normal file
6
roles/root/tasks/main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Deploys root password hash
|
||||
replace:
|
||||
path: /etc/shadow
|
||||
regexp: '^root:[^:]*:'
|
||||
replace: 'root:{{ root.passwd_hash }}:'
|
Loading…
Reference in New Issue
Block a user