source: darkpeak-services/roles/git/tasks/main.yml @ 55e0291f

ansiblekeycloakmatrixpleroma
Last change on this file since 55e0291f was 55e0291f, checked in by Mat Booth <mat.booth@…>, 19 months ago

Fixes #27 - Ticket references in commit log messages should be linkified

Implemented commit-msg filter for cgit to parse messages for ticket
numbers and commit hashs and linkify them

  • Property mode set to 100644
File size: 2.5 KB
Line 
1- name: Install gitolite/cgit and dependencies
2  apt:
3    name: "{{ item }}"
4    state: present
5    update_cache: yes
6    cache_valid_time: 10800   # 3 hours
7  with_items:
8    - gitolite3
9    - cgit
10    - python3-docutils
11    - python3-markdown
12    - python3-pygments
13
14- name: Enable cgid apache module
15  apache2_module:
16    name: cgid
17    state: present
18  notify:
19    - reload apache2
20
21# We are using apache to front the cgit CGI executables for the
22# web-based repo browser
23- name: Configure apache for cgit
24  include: ../../apache2/tasks/configure-apache-site.yml
25
26- name: Install gitolite configuration
27  template:
28    src: gitolite.rc.j2
29    dest: /etc/gitolite3/gitolite.rc
30    owner: root
31    group: root
32    mode: 0644
33
34- name: Add a symlink to gitolite.rc in every user's home directory
35  file:
36    src: /etc/gitolite3/gitolite.rc
37    dest: /etc/skel/.gitolite.rc
38    owner: root
39    group: root
40    state: link
41
42- name: Install gitolite initialisation script
43  copy:
44    src: gitolite_initial_setup
45    dest: /etc/skel_scripts/gitolite_initial_setup
46    group: root
47    owner: root
48    mode: 0755
49
50- name: Install gitolite wrapper for fetching pub keys
51  copy:
52    src: sss_ssh_authorizedkeys_wrapper
53    dest: /usr/bin/sss_ssh_authorizedkeys_wrapper
54    group: root
55    owner: root
56    mode: 0755
57
58- name: Configure sshd to use the gitolite wrapper for fetching pub keys
59  lineinfile:
60    dest: /etc/ssh/sshd_config
61    state: present
62    regexp: "^AuthorizedKeysCommand "
63    line: "AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys_wrapper"
64  notify:
65    - reload sshd
66
67- name: Install cgit project list munger script
68  copy:
69    src: darkpeak_project_list_munger
70    dest: /usr/sbin/darkpeak_project_list_munger
71    group: root
72    owner: root
73    mode: 0755
74
75- name: Install cron job to periodically run the munger script
76  cron:
77    name: project_list_munger
78    job: /usr/sbin/darkpeak_project_list_munger
79    minute: "*/5"
80    user: root
81    state: present
82
83- name: Install cgit configuration
84  template:
85    src: cgitrc.j2
86    dest: /etc/cgitrc
87    owner: root
88    group: root
89    mode: 0644
90  notify:
91    - reload apache2
92
93- name: Install custom cgit filters
94  template:
95    src: "{{ item }}.j2"
96    dest: "{{ filter_dir }}/{{ item }}"
97    owner: root
98    group: root
99    mode: 0755
100  with_items:
101    - commit-links.sh
102  notify:
103    - reload apache2
104
105- name: Install custom cgit Dark Peak branding
106  copy:
107    src: "{{ item }}"
108    dest: "{{ web_root }}/{{ item }}"
109    group: root
110    owner: root
111    mode: 0644
112  with_items:
113    - favicon.ico
114    - darkpeak-logo.png
Note: See TracBrowser for help on using the repository browser.