summaryrefslogtreecommitdiffstats
path: root/roles/git/server/tasks/main.yml
blob: f95ba428b64563f8743b6b2a57ad6463a37bee3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
# tasklist for setting up a git server (git:// access)

- name: install the git-daemon package
  yum: pkg=git-daemon state=present

# If NOT using xinetd
- name: delete stock git daemon config
  file: path="/usr/lib/systemd/system/git.service" state=absent
  when: ansible_distribution_major_version|int == 7

- name: configure git daemon
  template: >
    src="git@.service.j2"
    dest="/usr/lib/systemd/system/git@.service"
    mode=0644
  when: ansible_distribution_major_version|int == 7

# If using xinetd
- name: install xinetd
  yum: pkg=xinetd state=present
  when: ansible_distribution_major_version|int == 6

- name: install the xinetd config file
  template: >
    src="git.j2"
    dest="/etc/xinetd.d/git"
    mode=0644
  when: ansible_distribution_major_version|int == 6
  notify:
  - restart xinetd