Update PermitRootLogin task to work on Debian 11
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Ludovic Poujol 2022-06-21 15:13:33 +02:00
parent 050c61c220
commit 519ef930df
3 changed files with 5 additions and 2 deletions

View File

@ -16,6 +16,9 @@ The **patch** part changes is incremented if multiple releases happen the same m
### Fixed
* evolinux-base : Update PermitRootLogin task to work on Debian 11
* evolinux-user : Update PermitRootLogin task to work on Debian 11
### Removed
### Security

View File

@ -91,7 +91,7 @@
- name: disable SSH access for root
replace:
dest: /etc/ssh/sshd_config
regexp: '^PermitRootLogin (yes|without-password|prohibit-password)'
regexp: '^#?PermitRootLogin (yes|without-password|prohibit-password)'
replace: "PermitRootLogin no"
validate: '/usr/sbin/sshd -t -f %s'
notify: reload sshd

View File

@ -56,7 +56,7 @@
- name: disable root login
replace:
dest: /etc/ssh/sshd_config
regexp: '^PermitRootLogin (yes|without-password|prohibit-password)'
regexp: '^#PermitRootLogin (yes|without-password|prohibit-password)'
replace: "PermitRootLogin no"
notify: reload sshd
when: evolinux_root_disable_ssh | bool