From 7cf45a086618532abcbf9b10382c31337de1f061 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 29 Mar 2020 23:54:29 +0200 Subject: [PATCH] Append the git user to AllowUsers --- ansible/post-deploy.yml | 7 +++++++ 1 file changed, 7 insertions(+) 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'