diff options
Diffstat (limited to 'roles/cgit/tasks')
-rw-r--r-- | roles/cgit/tasks/main.yml | 44 |
1 files changed, 8 insertions, 36 deletions
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml index f84e7e8..286ffab 100644 --- a/roles/cgit/tasks/main.yml +++ b/roles/cgit/tasks/main.yml @@ -43,49 +43,21 @@ group: "{{ group_root }}" mode: 0755 -- name: unmount potential existing filesystem in target directory - shell: "umount /var/www/{{ cgit_git_dir_chroot }}" - register: result - failed_when: result.rc != 0 and "not currently mounted" not in result.stderr - - name: ensure cgit web directory exists file: path: /var/www/{{ cgit_git_dir_chroot }} owner: www group: daemon - mode: 0644 + mode: 0655 state: directory -- name: enable shared git directory in /etc/exports - lineinfile: - path: /etc/exports - regexp: "^{{ cgit_git_dir }}" - line: "{{ cgit_git_dir }} -mapall=root -alldirs -network=127.0.0.1 -mask=255.255.255.255 -ro" - owner: "{{ user_root }}" - group: "{{ group_root }}" - mode: 0644 - create: true - -- name: enable shared git directory in /etc/exports - lineinfile: - path: /etc/fstab - regexp: "^localhost:{{ cgit_git_dir }}" - line: "localhost:{{ cgit_git_dir }} /var/www/{{ cgit_git_dir_chroot }} nfs rw,nodev,nosuid,soft,intr 0 0" - -- name: start and enable share directory - service: - name: "{{ item }}" - state: restarted - enabled: true - loop: - - "portmap" - - "nfsd" - -- name: start and enable mountd - shell: | - rcctl enable mountd - pkill -9 mountd - rcctl start mountd +- 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: ensure nfs volume is mounted shell: mount -A |