[base-security] Remove root authorized keys
parent
bb4d0a6695
commit
dfaa2a9313
1
base.yml
1
base.yml
|
@ -19,6 +19,7 @@
|
||||||
- silice.adm.crans.org
|
- silice.adm.crans.org
|
||||||
roles:
|
roles:
|
||||||
- debian-apt-sources
|
- debian-apt-sources
|
||||||
|
- common-security
|
||||||
- common-tools
|
- common-tools
|
||||||
- rsync-client
|
- rsync-client
|
||||||
- ntp-client
|
- ntp-client
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: Delete authorized SSH keys for root account
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
loop:
|
||||||
|
- /root/.ssh/authorized_keys
|
||||||
|
- /root/.ssh/authorized_keys2
|
||||||
|
|
|
@ -36,11 +36,3 @@
|
||||||
dest: /etc/pam.d/common-account
|
dest: /etc/pam.d/common-account
|
||||||
regexp: 'pam_mkhomedir\.so'
|
regexp: 'pam_mkhomedir\.so'
|
||||||
line: "session required pam_mkhomedir.so skel=/etc/skel/ umask=0077"
|
line: "session required pam_mkhomedir.so skel=/etc/skel/ umask=0077"
|
||||||
|
|
||||||
# If LDAP crashes
|
|
||||||
- name: Install SSH keys for root account
|
|
||||||
authorized_key:
|
|
||||||
user: root
|
|
||||||
key: "{{ ssh_pub_keys }}"
|
|
||||||
state: present
|
|
||||||
exclusive: true
|
|
||||||
|
|
Loading…
Reference in New Issue