From 0f822dc490f3f90138b83fd9a323d0d37ef9512b Mon Sep 17 00:00:00 2001 From: binary Date: Thu, 18 Mar 2021 15:31:25 +0100 Subject: Variables refactoring and http auth. support --- roles/cgit/tasks/main.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'roles/cgit/tasks') diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml index 8022093..6b52bd7 100644 --- a/roles/cgit/tasks/main.yml +++ b/roles/cgit/tasks/main.yml @@ -11,7 +11,7 @@ - name: generate cgit configuration file template: - src: cgitrc.j2 + src: var-www-conf-cgitrc.j2 dest: /var/www/conf/cgitrc owner: "0" group: "0" @@ -19,7 +19,7 @@ - name: generate cgit configuration for httpd template: - src: cgit.httpd.conf.j2 + src: etc-httpd.d-cgit.conf.j2 dest: /etc/httpd.d/cgit.conf owner: "0" group: "0" @@ -59,13 +59,22 @@ nfsclient_server_dir: "{{ global.nfs_server_dir }}/{{ ansible_host }}/git" #nfsclient_server: "{{ global.nfs_server }}" -- name: ensure nfs volume is mounted - shell: mount -A - register: result - failed_when: result.rc != 0 and "Device busy" is not in result.stderr +- 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 state: restarted enabled: true + +- name: httpd password information + debug: + msg: | + Please provide a password using htpasswd, + in /htpasswd/cgit + when: cgit_authenticate -- cgit v1.2.3