[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit d7198511d71ddc306883bdf4620d02528c51b427
Author: Bastian Blank <waldi@xxxxxxxxxx>
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



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits