- name: RHELFAM | Restrict SSH on Docker hosts to specific group members
lineinfile: dest=/etc/ssh/sshd_config
state=present
regexp='^AllowGroups'
line='AllowGroups {{ ssh_allowed_groups | join(" ") }}'
backup=yes
validate='sshd -t -f %s'
when: ssh_allowed_groups is defined
notify:
- restart sshd
tags: limitsshusers