diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2021-07-29 17:00:20 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2021-07-29 17:00:20 +0200 |
commit | b232b894c3cbe087c8d504e91637dcf62199eed1 (patch) | |
tree | ea72a7d1a7f63c6425ee46785e1cec924351b2c3 /roles/cgit/tasks | |
parent | 22126073344e60c405d086df37b64da0c6d3c086 (diff) | |
download | infrastructure-b232b894c3cbe087c8d504e91637dcf62199eed1.tar.gz |
Bump to third revision of homelab
Diffstat (limited to 'roles/cgit/tasks')
-rw-r--r-- | roles/cgit/tasks/main.yml | 48 |
1 files changed, 13 insertions, 35 deletions
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml index 6b52bd7..fa68415 100644 --- a/roles/cgit/tasks/main.yml +++ b/roles/cgit/tasks/main.yml @@ -1,21 +1,22 @@ - -# cgit ~~ roles/cgit/tasks/main.yml -# cgit web interface - ---- - - name: ensure cgit is installed package: name: cgit state: present -- name: generate cgit configuration file +- name: generate cgit configuration files template: - src: var-www-conf-cgitrc.j2 - dest: /var/www/conf/cgitrc + src: "{{ item.template }}" + dest: "{{ item.file }}" owner: "0" group: "0" mode: "0644" + loop: + - template: conf-cgitrc.j2 + file: "{{ cgit_chroot_dir }}/conf/cgitrc" + - template: conf-footer.html.j2 + file: "{{ cgit_chroot_dir }}/conf/footer.html" + - template: etc-httpd.d-cgit.conf.j2 + file: /etc/httpd.d/cgit.conf - name: generate cgit configuration for httpd template: @@ -28,7 +29,7 @@ - name: copy utility in httpd chroot copy: src: "/bin/{{ item }}" - dest: /var/www/bin + dest: "{{ cgit_chroot_dir }}/bin" mode: preserve remote_src: true loop: @@ -38,34 +39,11 @@ - name: copy about-filter generator copy: src: about-filter.sh - dest: /var/www/bin/about-filter.sh + dest: "{{ cgit_chroot_dir }}/bin/about-filter.sh" owner: "0" group: "0" mode: "0755" -- name: ensure cgit web directory exists - file: - path: /var/www/{{ cgit_git_dir_chroot }} - owner: "{{ cgit_user }}" - group: daemon - state: directory - mode: "0755" - -- name: include nfsclient for remote dir - include_role: - name: nfsclient - vars: - nfsclient_dir: "/var/www/{{ cgit_git_dir_chroot }}" - nfsclient_server_dir: "{{ global.nfs_server_dir }}/{{ ansible_host }}/git" - #nfsclient_server: "{{ global.nfs_server }}" - -- name: chown git directory to git - file: - path: /data/git - owner: "{{ cgit_user }}" - group: "{{ cgit_group }}" - state: directory - - name: start and enable slowcgi service service: name: slowcgi @@ -76,5 +54,5 @@ debug: msg: | Please provide a password using htpasswd, - in /htpasswd/cgit + in "{{ cgit_chroot_dir }}/htpasswd/cgit" when: cgit_authenticate |