From 139afaa77974860e9d914f07ac0e7cfe97ca3662 Mon Sep 17 00:00:00 2001 From: Stonewall Jackson Date: Fri, 26 May 2023 06:30:51 -0400 Subject: cgit: add new role variables --- roles/cgit/README.md | 2 ++ roles/cgit/defaults/main.yml | 2 ++ roles/cgit/templates/etc/cgitrc.j2 | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'roles/cgit') diff --git a/roles/cgit/README.md b/roles/cgit/README.md index 5752229..fb64c34 100644 --- a/roles/cgit/README.md +++ b/roles/cgit/README.md @@ -25,6 +25,8 @@ Variable | Default `cgit_repository_sort` | `name` | Sort repositories by either `name` or `age` `cgit_branch_sort` | `name` | Sort branches by either `name` or `age` `cgit_about_html` | see [default vars](defaults/main.yml) | HTML to include in About page +`cgit_enable_blame` | yes | Enable `git blame` functionality +`cgit_robots` | `index, nofollow` | Value for the `robots` meta tag `cgit_favicon` |   | Path to custom favicon image `cgit_logo` |   | Path to custom logo image (ideally 96x64) `cgit_css` |   | Path to custom CSS file diff --git a/roles/cgit/defaults/main.yml b/roles/cgit/defaults/main.yml index 5866296..0de827c 100644 --- a/roles/cgit/defaults/main.yml +++ b/roles/cgit/defaults/main.yml @@ -8,6 +8,8 @@ cgit_description: Source code of various {{ organization }} projects. cgit_cache_size: 1000 cgit_project_list: /var/www/git/projects.list cgit_scan_path: /var/www/git/repositories +cgit_robots: 'index, nofollow' +cgit_enable_blame: yes cgit_enable_http_clone: no diff --git a/roles/cgit/templates/etc/cgitrc.j2 b/roles/cgit/templates/etc/cgitrc.j2 index f504896..871d363 100644 --- a/roles/cgit/templates/etc/cgitrc.j2 +++ b/roles/cgit/templates/etc/cgitrc.j2 @@ -1,7 +1,7 @@ cache-size={{ cgit_cache_size }} clone-prefix={{ cgit_clone_prefixes | join(' ') }} enable-http-clone={{ cgit_enable_http_clone | int }} -enable-blame=1 +enable-blame={{ cgit_enable_blame | int }} enable-commit-graph=1 enable-log-filecount=1 enable-log-linecount=1 @@ -26,6 +26,7 @@ root-readme={{ cgit_static_dir }}/about.html repository-sort={{ cgit_repository_sort }} snapshots=tar.gz zip local-time=1 +robots={{ cgit_robots }} mimetype.gif=image/gif mimetype.html=text/html -- cgit