diff options
Diffstat (limited to 'roles/cgit/tasks')
-rw-r--r-- | roles/cgit/tasks/main.yaml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/roles/cgit/tasks/main.yaml b/roles/cgit/tasks/main.yaml new file mode 100644 index 0000000..cc18696 --- /dev/null +++ b/roles/cgit/tasks/main.yaml @@ -0,0 +1,70 @@ +--- +- name: Install cgit package and depencies + apt: name={{item}} state=present + with_items: + - cgit + - highlight + +- name: Install cgit highlighting script + copy: + src=cgit.source.filter + dest=/etc/cgit.source.filter + mode=0755 + +- name: Create cgit assets dir + file: + name=/var/www/{{ git_server_name }}/static + recurse=yes + state=directory + +- name: Put cgit assets + copy: + src="cgit-assets/{{item}}" + dest="/var/www/{{ git_server_name }}/static/{{item}}" + with_items: + - git.css + - highlight.css + - logo.png + +- name: Symlink cgit css + file: + name="/var/www/{{git_server_name}}/static/cgit.css" + state=link + src=../../../../usr/share/cgit/cgit.css + +- name: Symlink robots.txt + file: + name="/var/www/{{git_server_name}}/robots.txt" + state=link + src=../../../usr/share/cgit/robots.txt + +- name: Put cgit configuration + template: + src=cgitrc.j2 + dest=/etc/cgitrc + +- name: Put apache config + template: + src=vhost.conf.j2 + dest=/etc/apache2/sites-enabled/cgit.conf + +- name: Create config snippet dir + file: + name=/etc/apache2/sites/{{ git_server_name }} + recurse=yes + state=directory + +- name: Place config snippets + template: + dest=/etc/apache2/sites/{{ git_server_name }}/{{ item }} + src={{ item }}.j2 + with_items: + - repocreate-plain.conf + - repocreate-ssl.conf + - server.conf + - ssl.conf + notify: Reload apache + +- include: ../../apache/tasks/ssl.yaml + vars: + ssl_server_name: "{{git_server_name}}" |