I have to use Ansible modules in order to edit the /etc/ssh/sshd_config file - every time I create a new user I want to append it at these two lines:
AllowUs
This worked for me
- name: Add Group to AllowGroups lineinfile: dest=/etc/ssh/sshd_config backup=True backrefs=True state=present regexp='^(AllowGroups(?!.*\b{{ groupname }}\b).*)$' line='\1 {{ groupname }}'