Add permitrootlogin at beginning of file

This commit is contained in:
Alexis Ben Miloud--Josselin 2023-07-21 11:49:35 +02:00
parent 7e15e01b14
commit fbb0b73e3a

View file

@ -83,10 +83,11 @@
- name: disable root login (Debian >= 12)
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf
path: /etc/ssh/sshd_config.d/z-evolinux-users.conf
line: "PermitRootLogin no"
create: yes
validate: '/usr/sbin/sshd -t -f %s'
insertbefore: "BOF"
notify: reload sshd
when:
- evolinux_root_disable_ssh | bool