diff --git a/ansible/post-deploy.yml b/ansible/post-deploy.yml index bd702cd..2a0cbe4 100644 --- a/ansible/post-deploy.yml +++ b/ansible/post-deploy.yml @@ -102,3 +102,10 @@ force: true owner: git become: true + + - name: Add git user to AllowUsers SSH configuration + replace: + backup: true + dest: /etc/ssh/sshd_config + regexp: '^(AllowUsers(?!.*\bgit\b).*)$' + replace: '\1 git'