blob: 851287e193c459c907a10393c10ab55405eceded (
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
41
42
43
44
45
46
47
48
49
50
|
- name: install git package
package:
name: git
state: present
- name: create git group
group:
name: "{{ git_group }}"
state: present
- name: create git user
user:
name: "{{ git_user }}"
group: "{{ git_group }}"
shell: "{{ git_shell }}"
home: "{{ git_dir }}"
create_home: false
- name: create git directories
file:
path: "{{ item }}"
owner: "{{ git_user }}"
group: "{{ git_group }}"
state: directory
mode: 0755
loop:
- "{{ git_dir }}"
- "{{ git_dir }}/git-shell-commands"
- name: generate git-shell no-login prompt
template:
src: no-interactive-login.j2
dest: "{{ git_dir }}/git-shell-commands/no-interactive-login"
owner: "{{ git_user }}"
group: "{{ git_group }}"
mode: "0744"
when: not git_allow_ssh_login
- name: generate gitconfig
template:
src: gitconfig.j2
dest: "{{ git_dir }}/.gitconfig"
owner: "{{ git_user }}"
group: "{{ git_group }}"
mode: 0644
- name: include ssh key synchronization
include_role:
name: sshd
tasks_from: synchronize_keys.yml
|