blob: 5508b1e13a5f4fc9f9bfb3d0851e7b558ba25811 (
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
32
33
34
35
|
- name: Install git daemon
community.general.apk:
name: git-daemon-openrc
- name: Create read-only git user
ansible.builtin.user:
name: "{{ git_readonly_user }}"
group: "{{ git_readonly_group }}"
- name: Configure git daemon
register: gitd_conf
ansible.builtin.template:
src: conf.d/git-daemon
dest: /etc/conf.d/git-daemon
- name: Restart git daemon and configure to start on boot
when: gitd_conf is changed
ansible.builtin.service:
name: git-daemon
enabled: true
state: restarted
- name: Start git daemon and configure to start on boot
when: not ( gitd_conf is changed )
ansible.builtin.service:
name: git-daemon
enabled: true
state: started
- name: Mark git directory safe in system-wide git config
register: gitconfig
community.general.git_config:
name: safe.directory
add_mode: add
value: "{{ git_directory }}/*"
|