evolinux-base: replace value if present
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2626|7|2619|15|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/374//ansiblelint">Evolix » ansible-roles » unstable #374</a>
gitea/ansible-roles/pipeline/head This commit looks good

This commit is contained in:
Jérémy Lecour 2023-10-14 07:20:57 +02:00 committed by Jérémy Lecour
parent 86e753b7a0
commit 3e55768c49
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY

View file

@ -90,7 +90,7 @@
- "set shiftwidth=4"
when: evolinux_root_vim_conf | bool
- name: disable SSH access for root
- name: disable SSH access for root (Debian < 12)
ansible.builtin.replace:
dest: /etc/ssh/sshd_config
regexp: '^#?PermitRootLogin (yes|without-password|prohibit-password)'
@ -115,6 +115,7 @@
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf
line: "PermitRootLogin no"
regexp: "^#?PermitRootLogin "
create: yes
mode: "0644"
validate: '/usr/sbin/sshd -t -f %s'