No need to add individual users, a group is enough

This commit is contained in:
Jérémy Lecour 2017-10-08 14:23:21 +02:00
parent a07d1d873a
commit 8c1024c23c

View file

@ -59,13 +59,14 @@
register: grep_matchuser_ssh register: grep_matchuser_ssh
check_mode: no check_mode: no
- name: "Add Match User sshd directive for '{{ user.name }}'" # - name: "Add Match User sshd directive for '{{ user.name }}'"
lineinfile: # lineinfile:
dest: /etc/ssh/sshd_config # dest: /etc/ssh/sshd_config
line: "\nMatch User {{ user.name }}\n PasswordAuthentication no" # line: "\nMatch User {{ user.name }}\n PasswordAuthentication no"
validate: '/usr/sbin/sshd -T -f %s' # insertbefore: "# BEGIN EVOLINUX PASSWORD RESTRICTIONS"
notify: reload sshd # validate: '/usr/sbin/sshd -T -f %s'
when: grep_matchuser_ssh.rc != 0 # notify: reload sshd
# when: grep_matchuser_ssh.rc != 0
- name: "Modify Match User's sshd directive for '{{ user.name }}'" - name: "Modify Match User's sshd directive for '{{ user.name }}'"
replace: replace: