[tor-commits] [dip/master] Maintain git config as file

hiro at torproject.org hiro at torproject.org
Thu Dec 19 15:30:34 UTC 2019


commit d7198511d71ddc306883bdf4620d02528c51b427
Author: Bastian Blank <waldi at debian.org>
Date:   Thu Dec 12 19:15:30 2019 +0100

    Maintain git config as file
---
 roles/gitaly/tasks/git.yml          | 23 ++++-------------------
 roles/gitaly/templates/gitconfig.j2 | 22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/roles/gitaly/tasks/git.yml b/roles/gitaly/tasks/git.yml
index ea4888f..1b257dd 100644
--- a/roles/gitaly/tasks/git.yml
+++ b/roles/gitaly/tasks/git.yml
@@ -1,22 +1,7 @@
 ---
 - name: set git options
-  git_config:
-    name: '{{ item.key }}'
-    value: '{{ item.value }}'
-    scope: global
-  loop: '{{ items | dict2items }}'
-  vars:
-    items:
-      core.autocrlf: input
-      fsck.badDate: ignore
-      fsck.badEmail: ignore
-      fsck.duplicateEntries: ignore
-      fsck.missingEmail: ignore
-      fsck.missingNameBeforeEmail: ignore
-      fsck.missingSpaceBeforeDate: ignore
-      gc.auto: 0
-      index.threads: 1
-      pack.threads: 1
-      receive.advertisePushOptions: 'true'
-      repack.writeBitmaps: 'true'
+  template:
+    src: gitconfig.j2
+    dest: '{{ ansible_user_dir }}/.gitconfig'
+    mode: 0644
   tags: git-config
diff --git a/roles/gitaly/templates/gitconfig.j2 b/roles/gitaly/templates/gitconfig.j2
new file mode 100644
index 0000000..263e29f
--- /dev/null
+++ b/roles/gitaly/templates/gitconfig.j2
@@ -0,0 +1,22 @@
+[core]
+  autocrlf = input
+[fsck]
+  badDate = ignore
+  badEmail = ignore
+  duplicateEntries = ignore
+  missingEmail = ignore
+  missingNameBeforeEmail = ignore
+  missingSpaceBeforeDate = ignore
+[gc]
+  auto = 0
+[index]
+  threads = 1
+[pack]
+  threads = 1
+[receive]
+  advertisePushOptions = true
+[repack]
+  writeBitmaps = true
+[user]
+  email = git@{{ external_domain }}
+  name = GIT





More information about the tor-commits mailing list