From 8e24c71b16c55752a4cdbf37748b57317d5abbfd Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 10 Apr 2016 00:39:47 -0400 Subject: git: add git-daemon config --- roles/git/tasks/cgit.yml | 10 ++++++++++ roles/git/tasks/git-daemon.yml | 14 ++++++++++++++ roles/git/tasks/main.yml | 1 + 3 files changed, 25 insertions(+) create mode 100644 roles/git/tasks/git-daemon.yml (limited to 'roles/git/tasks') diff --git a/roles/git/tasks/cgit.yml b/roles/git/tasks/cgit.yml index 3362d2c..b70c382 100644 --- a/roles/git/tasks/cgit.yml +++ b/roles/git/tasks/cgit.yml @@ -8,6 +8,15 @@ tags: - dependencies +- name: Create dir to work around bug in debian jessie cgit + when: (ansible_distribution == "Debian" and ansible_distribution_major_version == "8") + file: state=directory + path=/var/cache/cgit + group=www-data + owner=www-data + mode=0772 + recurse=yes + - name: Copy cgitrc template: src=etc_cgitrc.j2 dest=/etc/cgitrc group=www-data @@ -20,6 +29,7 @@ group=www-data mode=0775 recurse=yes + notify: fcgiwrap restart - name: Upload Custom cgit Static Files (css, robots.txt, logo, etc) copy: src={{ item.src }} dest={{ item.dest }} diff --git a/roles/git/tasks/git-daemon.yml b/roles/git/tasks/git-daemon.yml new file mode 100644 index 0000000..793275c --- /dev/null +++ b/roles/git/tasks/git-daemon.yml @@ -0,0 +1,14 @@ + +- name: Install git-daemon-sysvinit package + apt: pkg={{ item }} state=installed + with_items: + - git-daemon-sysvinit + tags: + - dependencies + +- name: Configure git-daemon + template: src=etc_default_git-daemon.j2 + dest=/etc/default/git-daemon + group=root + owner=root + notify: git-daemon restart diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml index 33302ee..c90c0a9 100644 --- a/roles/git/tasks/main.yml +++ b/roles/git/tasks/main.yml @@ -1,2 +1,3 @@ - include: gitolite.yml tags=gitolite - include: cgit.yml tags=cgit +- include: git-daemon.yml tags=git-daemon -- cgit v1.2.3