Fix mode for files under /etc/ssh/sshd_config.d
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2621|5|2616|10|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/322//ansiblelint">Evolix » ansible-roles » unstable #322</a> Details
gitea/ansible-roles/pipeline/head This commit looks good Details

This commit is contained in:
Alexis Ben Miloud--Josselin 2023-08-16 18:21:06 +02:00
parent 36cd982f35
commit 536d051890
5 changed files with 7 additions and 1 deletions

View File

@ -64,6 +64,8 @@ The **patch** part changes is incremented if multiple releases happen the same m
* nginx: set default server directive in default vhost
* opendkim: update apt cache before install
* redis: replace errorneous ini_file module for Munin config, fix dedicted Munin config filename (z-XXX).
* evolinux-base, evolinux-users: Fix files mode under /etc/ssh/sshd_config.d
* evolinux-base: Fix file extension
### Removed

View File

@ -106,6 +106,7 @@
path: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf
line: "PermitRootLogin no"
create: yes
mode: "0644"
validate: '/usr/sbin/sshd -t -f %s'
notify: reload sshd
when:

View File

@ -7,6 +7,7 @@
ansible.builtin.template:
src: sshd/defaults.j2
dest: /etc/ssh/sshd_config.d/z-evolinux-defaults.conf
mode: "0644"
- name: "Get current user's group"
ansible.builtin.command:
@ -27,7 +28,7 @@
- name: "Add AllowUsers sshd directive for current user"
ansible.builtin.lineinfile:
dest: /etc/ssh/sshd_config.d/allow_evolinux_user
dest: /etc/ssh/sshd_config.d/allow_evolinux_user.conf
line: "AllowUsers {{ logname.stdout }}"
insertafter: 'Subsystem'
validate: '/usr/sbin/sshd -t -f %s'

View File

@ -86,6 +86,7 @@
path: /etc/ssh/sshd_config.d/z-evolinux-users.conf
line: "PermitRootLogin no"
create: yes
mode: "0644"
validate: '/usr/sbin/sshd -t -f %s'
insertbefore: "BOF"
notify: reload sshd

View File

@ -39,6 +39,7 @@
path: /etc/ssh/sshd_config.d/z-evolinux-users.conf
line: "AllowGroups {{ evolinux_ssh_group }}"
create: yes
mode: "0644"
validate: '/usr/sbin/sshd -t -f %s'
when:
- ansible_distribution_major_version is version('12', '>=')