From e60e99796111ee6d43080b4e48971c08886c0570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 11 Dec 2021 13:54:22 +0000 Subject: roles: Add git and cgit roles --- roles/cgit/templates/cgitrc.j2 | 39 +++++++++++++++++++++++++++++++++++++ roles/cgit/templates/footer.html.j2 | 3 +++ roles/cgit/templates/httpd.conf.j2 | 18 +++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 roles/cgit/templates/cgitrc.j2 create mode 100644 roles/cgit/templates/footer.html.j2 create mode 100644 roles/cgit/templates/httpd.conf.j2 (limited to 'roles/cgit/templates') diff --git a/roles/cgit/templates/cgitrc.j2 b/roles/cgit/templates/cgitrc.j2 new file mode 100644 index 0000000..40b4b07 --- /dev/null +++ b/roles/cgit/templates/cgitrc.j2 @@ -0,0 +1,39 @@ +# managed by Ansible + +# visuals +css={{ cgit__css }} +logo={{ cgit__logo }} +favicon={{ cgit__favicon }} +footer={{ cgit__footer }} + +# readme +readme=:README.md +readme=:README.org +readme=:README +readme=:.README.md +readme=:.README +about-filter=/bin/about-filter.sh + +# features +enable-commit-graph=1 +enable-http-clone=1 +enable-index-links=1 +max-stats=quarter +robots=noindex, nofollow +localtime=1 + +# git +clone-url={{ cgit__clone_urls | join(' ') }} + +# instance id +root-title=git.{{ __global_domain_name }} +root-desc={{ cgit__root_desc }} +root-readme={{ cgit__root_readme }} + +# archives +snapshots=tar.gz + +# sections +section-from-path=1 +section-sort=1 +scan-path={{ cgit_git_dir }} diff --git a/roles/cgit/templates/footer.html.j2 b/roles/cgit/templates/footer.html.j2 new file mode 100644 index 0000000..66ca627 --- /dev/null +++ b/roles/cgit/templates/footer.html.j2 @@ -0,0 +1,3 @@ + +remember that computers suck. + diff --git a/roles/cgit/templates/httpd.conf.j2 b/roles/cgit/templates/httpd.conf.j2 new file mode 100644 index 0000000..962016a --- /dev/null +++ b/roles/cgit/templates/httpd.conf.j2 @@ -0,0 +1,18 @@ +# managed by Ansible + +server "cgit" { + listen on "{{ cgit_ip }}" port {{ cgit_port }} +{% if cgit_authenticate %} + authenticate "realm" with "/htpasswd/cgit" +{% endif %} + + # cgit + location "/cgit.*" { + root "/cgit" + no fastcgi + } + + # fastcgi + root "/cgi-bin/cgit.cgi" + fastcgi socket "/run/slowcgi.sock" +} -- cgit v1.2.3