blob: fc0500683b988eeff94a38ec88b54a8e66f119f0 (
plain) (
blame)
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
36
37
38
39
40
|
---
- name: Add git user
user:
name: "{{ git_user }}"
home: "{{ git_dir }}"
system: yes
generate_ssh_key: yes
state: present
- name: Install gitolite (and git)
package:
name: "{{ item }}"
state: present
with_items:
- git-core
- gitolite3
- name: Check if this is a new installation
stat:
path: "{{ git_dir }}/.gitolite"
register: gitolite_dir
- include: "init.yml"
when: not gitolite_dir.stat.exists
- name: Copy configuration from template
template:
src: gitolite.rc.j2
dest: "{{ git_dir }}/.gitolite.rc"
mode: 0644
owner: "{{ git_user }}"
group: "{{ git_group }}"
backup: yes
- name: Set permissions on {{ git_dir }}
file:
path: "{{ git_dir }}"
recurse: yes
owner: "{{ git_user }}"
group: "{{ git_group }}"
|