From fdd5293dd05890434c5b1660bfc44d493a4f4056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sun, 12 May 2024 17:33:39 +0200 Subject: feat(roles/cgit): new variables structure --- roles/cgit/templates/cgitrc.j2 | 44 +++++++++++++++++++------------------- roles/cgit/templates/httpd.conf.j2 | 4 ++-- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'roles/cgit/templates') diff --git a/roles/cgit/templates/cgitrc.j2 b/roles/cgit/templates/cgitrc.j2 index 4c139d4..6e8965a 100644 --- a/roles/cgit/templates/cgitrc.j2 +++ b/roles/cgit/templates/cgitrc.j2 @@ -1,9 +1,5 @@ # managed by Ansible -# cache -cache-root={{ cgit_cache_dir }} -cache-size={{ cgit_cache_size }} - # readme readme=:README.md readme=:README.org @@ -12,6 +8,15 @@ readme=:.README.md readme=:.README about-filter=/bin/about-filter.sh +# mimetypes +mimetype.gif=image/gif +mimetype.html=text/html +mimetype.jpg=image/jpeg +mimetype.jpeg=image/jpeg +mimetype.pdf=application/pdf +mimetype.png=image/png +mimetype.svg=image/svg+xml + # features enable-commit-graph=1 enable-http-clone=1 @@ -24,19 +29,23 @@ max-stats=quarter robots=noindex, nofollow localtime=1 +# cache +cache-root={{ cgit__cache_dir | replace(cgit__chroot_dir, '') }} +cache-size={{ cgit__cache_size }} + # git -clone-url={{ cgit_clone_urls | join(' ') }} +clone-url={{ cgit__clone_urls | join(' ') }} # instance id -root-title={{ cgit_domain_name }} -root-desc={{ cgit_description }} -root-readme={{ cgit_readme_url }} +root-title={{ cgit__title }} +root-desc={{ cgit__description }} +root-readme={{ cgit__readme_url }} # visuals -css={{ cgit_css_url }} -logo={{ cgit_logo_url }} -favicon={{ cgit_favicon_url }} -footer={{ cgit_footer_path }} +css={{ cgit__css_url }} +logo={{ cgit__logo_url }} +favicon={{ cgit__favicon_url }} +footer={{ cgit__footer_file | replace(cgit__chroot_dir, '') }} # archives snapshots=tar.gz @@ -44,13 +53,4 @@ snapshots=tar.gz # sections section-from-path=1 section-sort=1 -scan-path={{ cgit_git_dir }} - -# mimetypes -mimetype.gif=image/gif -mimetype.html=text/html -mimetype.jpg=image/jpeg -mimetype.jpeg=image/jpeg -mimetype.pdf=application/pdf -mimetype.png=image/png -mimetype.svg=image/svg+xml +scan-path={{ cgit__repositories_dir | replace(cgit__chroot_dir, '') }} diff --git a/roles/cgit/templates/httpd.conf.j2 b/roles/cgit/templates/httpd.conf.j2 index 0220f90..48f840d 100644 --- a/roles/cgit/templates/httpd.conf.j2 +++ b/roles/cgit/templates/httpd.conf.j2 @@ -1,7 +1,7 @@ # managed by Ansible -server "cgit" { - listen on "{{ cgit_listen_address }}" port {{ cgit_listen_port }} +server "{{ cgit__domain_name }}" { + listen on {{ cgit__listen_address }} port {{ cgit__listen_port }} # cgit location "/cgit.*" { -- cgit v1.2.3