From 66c4994c1eb7aa48181d7ae2a623eecd868f8175 Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Thu, 8 Jul 2021 00:04:45 +0300
Subject: [PATCH] svntogit: Set SHELL=/bin/bash for git pull to work

The default login shell for the svntogit user (/sbin/nologin) breaks
the Match Exec directives in /srv/svntogit/.ssh/config and prohibits
Git from using the correct SSH key.

While we're at it, add --set-upstream to the git pull command so the
task is more likely to accomplish its intended purpose.
---
 roles/dbscripts/tasks/main.yml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/roles/dbscripts/tasks/main.yml b/roles/dbscripts/tasks/main.yml
index 92bbc0bb3..efe1df7c7 100644
--- a/roles/dbscripts/tasks/main.yml
+++ b/roles/dbscripts/tasks/main.yml
@@ -265,7 +265,9 @@
 
 # The following command also serves as a way to get the data the first time the repo is set up
 - name: configure svntogit pull upstream branch
-  command: git pull public master chdir=/srv/svntogit/repos/{{ item }}
+  command: git pull --set-upstream public master chdir=/srv/svntogit/repos/{{ item }}
+  environment:
+    - SHELL: /bin/bash
   with_items:
     - community
     - packages
-- 
GitLab