diff options
Diffstat (limited to 'git/web/tasks/main.yaml')
| -rw-r--r-- | git/web/tasks/main.yaml | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/git/web/tasks/main.yaml b/git/web/tasks/main.yaml index 6a33521..42ea072 100644 --- a/git/web/tasks/main.yaml +++ b/git/web/tasks/main.yaml @@ -20,12 +20,23 @@ file: path="/etc/cgit" state="directory" when: cgit_header_src is defined or cgit_footer_src is defined +- name: install cgit custom source filter + become: yes + copy: src="{{cgit_source_filter_src}}" dest="{{cgit_source_filter_path}}" mode="0755" + when: cgit_source_filter_src is defined + notify: restart fcgiwrap + - 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 favicon + become: yes + copy: src="{{cgit_favicon_src}}" dest="/usr/share/cgit/favicon.ico" + when: cgit_favicon_src is defined + - name: install cgit header become: yes copy: src="{{cgit_header_src}}" dest="/etc/cgit/header.html" @@ -41,25 +52,13 @@ - name: set cgit repo owners become: yes shell: | - for repo in {{cgit_scan_path}}*/; do - git config --file "${repo}config" gitweb.owner "{{cgit_owner}}" + find {{cgit_scan_path}} -maxdepth 2 -name HEAD -type f | while read headfile; do + repodir=$(dirname "$headfile") + git config --file "${repodir}/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" - notify: restart nginx - -- name: enable cgit nginx site - become: yes - file: - src: "/etc/nginx/sites-available/cgit.conf" - dest: "/etc/nginx/sites-enabled/cgit.conf" - state: "link" - notify: restart nginx - - name: ensure fcgiwrap service is started become: yes systemd: name="fcgiwrap.service" enabled="yes" state="started" |
