summaryrefslogtreecommitdiff
path: root/roles/gitolite/http/templates/cgitrc.j2
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2023-08-30 15:07:28 +0200
committerChristian Pointner <equinox@spreadspace.org>2023-08-30 15:07:28 +0200
commitac9829aad8a0e2266eca9132f26ef541b80bf7f3 (patch)
tree0e74d59267e93f9258da0e3e5ae60dd9f6299880 /roles/gitolite/http/templates/cgitrc.j2
parentprometheus/smartmon textfile collector: since this unit needs CAP_SYS_ADMIN w... (diff)
gitolite: allow custom user to be defined and refactor handling of http role
Diffstat (limited to 'roles/gitolite/http/templates/cgitrc.j2')
-rw-r--r--roles/gitolite/http/templates/cgitrc.j214
1 files changed, 7 insertions, 7 deletions
diff --git a/roles/gitolite/http/templates/cgitrc.j2 b/roles/gitolite/http/templates/cgitrc.j2
index fd3a4681..131042d2 100644
--- a/roles/gitolite/http/templates/cgitrc.j2
+++ b/roles/gitolite/http/templates/cgitrc.j2
@@ -1,16 +1,16 @@
## {{ ansible_managed }}
css=/cgit-css/cgit.css
-{% if 'logo' in gitolite_instances[gitolite_instance].http %}
+{% if 'logo' in item.value.http %}
logo=/logo.png
{% else %}
logo=/cgit-css/cgit.png
{% endif %}
-{% if 'title' in gitolite_instances[gitolite_instance].http %}
-root-title={{ gitolite_instances[gitolite_instance].http.title }}
+{% if 'title' in item.value.http %}
+root-title={{ item.value.http.title }}
{% endif %}
-{% if 'description' in gitolite_instances[gitolite_instance].http %}
-root-desc={{ gitolite_instances[gitolite_instance].http.description }}
+{% if 'description' in item.value.http %}
+root-desc={{ item.value.http.description }}
{% endif %}
enable-blame=1
@@ -25,7 +25,7 @@ enable-tree-linenumbers=1
virtual-root=/cgit/
source-filter=/usr/lib/cgit/filters/syntax-highlighting.py
-clone-url=ssh://git-{{ gitolite_instance }}@{{ gitolite_instances[gitolite_instance].http.hostnames[0] }}{% if ansible_port is defined %}:{{ ansible_port }}{% endif %}/$CGIT_REPO_URL{% if gitolite_instances[gitolite_instance].http.enable_git_backend | default(false) %} https://{{ gitolite_instances[gitolite_instance].http.hostnames[0] }}/$CGIT_REPO_URL{% endif %}
+clone-url=ssh://{{ item.value.user | default('git-' + item.key) }}@{{ item.value.http.hostnames[0] }}{% if ansible_port is defined %}:{{ ansible_port }}{% endif %}/$CGIT_REPO_URL{% if item.value.http.enable_git_backend | default(false) %} https://{{ item.value.http.hostnames[0] }}/$CGIT_REPO_URL{% endif %}
strict-export=git-daemon-export-ok
-scan-path={{ gitolite_base_path }}/{{ gitolite_instance }}/repositories
+scan-path={{ gitolite_base_path }}/{{ item.key }}/repositories