diff options
| author | Luke Hoersten <[email protected]> | 2026-04-18 20:55:32 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-04-18 20:55:32 -0500 |
| commit | 2592380207121753a2f64abd9c4fd4b3e99b3c0f (patch) | |
| tree | 3c2971681bfcb7116b209ae025a7f6a1e1de5bf8 /git/web/tasks | |
| parent | eb73ba26e2ef66e38097b784fb3c4621a2991a40 (diff) | |
Make cgit theme configurable via variables, fix owner discovery
Add cgit_css_src, cgit_header_src, cgit_footer_src, cgit_owner variables to
optionally install a custom theme without hardcoding nth.io. Move scan-path
after enable-git-config in cgitrc so gitweb.owner is read from repo git
configs. Switch repo owner loop from find|while to glob for loop to avoid
subshell issues.
Diffstat (limited to 'git/web/tasks')
| -rw-r--r-- | git/web/tasks/main.yaml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/git/web/tasks/main.yaml b/git/web/tasks/main.yaml index 58a2005..6a33521 100644 --- a/git/web/tasks/main.yaml +++ b/git/web/tasks/main.yaml @@ -15,6 +15,38 @@ template: src="cgitrc.j2" dest="/etc/cgitrc" notify: restart fcgiwrap +- name: make /etc/cgit dir + become: yes + file: path="/etc/cgit" state="directory" + when: cgit_header_src is defined or cgit_footer_src is defined + +- name: install cgit custom css + become: yes + copy: src="{{cgit_css_src}}" dest="/usr/share/cgit/cgit-custom.css" + when: cgit_css_src is defined + notify: restart nginx + +- name: install cgit header + become: yes + copy: src="{{cgit_header_src}}" dest="/etc/cgit/header.html" + when: cgit_header_src is defined + notify: restart fcgiwrap + +- name: install cgit footer + become: yes + copy: src="{{cgit_footer_src}}" dest="/etc/cgit/footer.html" + when: cgit_footer_src is defined + notify: restart fcgiwrap + +- name: set cgit repo owners + become: yes + shell: | + for repo in {{cgit_scan_path}}*/; do + git config --file "${repo}config" gitweb.owner "{{cgit_owner}}" + done + when: cgit_owner is defined + changed_when: true + - name: install cgit nginx site become: yes template: src="cgit.nginx.conf.j2" dest="/etc/nginx/sites-available/cgit.conf" |
