diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2024-05-12 17:33:39 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2024-05-12 17:36:32 +0200 |
commit | fdd5293dd05890434c5b1660bfc44d493a4f4056 (patch) | |
tree | 204e3a16a6d301c957aa3126d7fcf0ea188b2f32 /roles/cgit/templates | |
parent | a355ee21c15e915f394952abe76703d7865c991b (diff) | |
download | rules-fdd5293dd05890434c5b1660bfc44d493a4f4056.tar.gz |
feat(roles/cgit): new variables structure
Diffstat (limited to 'roles/cgit/templates')
-rw-r--r-- | roles/cgit/templates/cgitrc.j2 | 44 | ||||
-rw-r--r-- | roles/cgit/templates/httpd.conf.j2 | 4 |
2 files changed, 24 insertions, 24 deletions
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.*" { |