diff options
author | binary <me@rgoncalves.se> | 2021-01-17 19:21:43 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-01-17 19:22:13 +0100 |
commit | f83652e0e723af7afbeb3494ed888db76d5efa82 (patch) | |
tree | c0d11d4ededb8c3b1804e2bb9d8f05b67ad05bf8 /roles/cgit/templates | |
parent | 58a81dc2ea748cf769d88b7515a39c6587d37ce2 (diff) | |
download | infrastructure-f83652e0e723af7afbeb3494ed888db76d5efa82.tar.gz |
Add cgit deploiement role with configuration
Diffstat (limited to 'roles/cgit/templates')
-rw-r--r-- | roles/cgit/templates/cgit.httpd.conf.j2 | 17 | ||||
-rw-r--r-- | roles/cgit/templates/cgitrc.j2 | 37 |
2 files changed, 54 insertions, 0 deletions
diff --git a/roles/cgit/templates/cgit.httpd.conf.j2 b/roles/cgit/templates/cgit.httpd.conf.j2 new file mode 100644 index 0000000..a8b4707 --- /dev/null +++ b/roles/cgit/templates/cgit.httpd.conf.j2 @@ -0,0 +1,17 @@ + +# httpd ~~ /etc/httpd.d/cgit.conf" +# managed by Ansible + +ext_ip="0.0.0.0" +server "cgit" { + listen on $ext_ip port {{ cgit_port }} + + # serve cgit static files directly: cgit.css and cgit.png + location "/cgit.*" { + root "/cgit" + no fastcgi + } + # cgit CGI + root "/cgi-bin/cgit.cgi" + fastcgi socket "/run/slowcgi.sock" +} diff --git a/roles/cgit/templates/cgitrc.j2 b/roles/cgit/templates/cgitrc.j2 new file mode 100644 index 0000000..1c316f3 --- /dev/null +++ b/roles/cgit/templates/cgitrc.j2 @@ -0,0 +1,37 @@ + +# cgit ~~ /var/www/conf/cgitrc +# managed by Ansible + +# visuals +css={{ cgit_config_css }} +logo={{ cgit_config_logo }} +favicon={{ cgit_config_favicon }} + +# readme +readme=:README.md +readme=:README.org +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 + +# git +clone-url=git://git.{{ global.domain_name }}/$CGIT_REPO_URL ssh://git@git.{{ global.domain_name }}/$CGIT_REPO_URL http://git.{{ global.domain_name }}/$CGIT_REPO_URL + +# instance id +root-title=git.{{ global.domain_name }} +root-desc={{ cgit_config_root_desc }} +root-readme={{ cgit_config_root_readme }} + +# archives +snapshots=tar.gz + +# sections +section-from-path=1 +section-sort=1 +scan-path={{ cgit_git_dir_chroot }} |