Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (59 sloc) 1.51 KB
---
- name: Rename the user gitolite into git
command: usermod --move-home --login git --home "{{ pagure_git_rootpath }}"/ gitolite3
args:
creates: "{{ pagure_git_rootpath }}"
- name: Rename the group gitolite into git
command: groupmod --new-name git gitolite3
args:
creates: "{{ pagure_git_rootpath }}/.gitolite"
- name: Ensuring correct context on dir
file:
path: "{{ pagure_git_rootpath }}"
state: directory
owner: git
group: git
setype: gitosis_var_lib_t
- name: Ensuring correct context on dir
file:
path: "{{ pagure_git_rootpath }}/.ssh"
recurse: True
state: directory
owner: git
group: git
setype: ssh_home_t
- name: Ensuring correct context on file
file:
path: "{{ pagure_git_rootpath }}/.ssh/authorized_keys"
state: file
owner: git
group: git
setype: ssh_home_t
- name: Needed structure for gitolite config files
file:
state: directory
owner: git
group: git
mode: 0755
path: "{{ pagure_git_rootpath }}/{{ item }}"
setype: gitosis_var_lib_t
with_items:
- .gitolite
- .gitolite/logs
- .gitolite/conf
- .gitolite/keydir
- name: Gitolite rc file
template:
src: gitolite.rc.j2
dest: "{{ pagure_git_rootpath }}/.gitolite.rc"
owner: git
group: git
mode: 0755
setype: gitosis_var_lib_t
- name: Ensuring gitolite.conf exists
file:
path: "{{ pagure_git_rootpath}}/.gitolite/conf/gitolite.conf"
state: touch
owner: git
group: git
setype: gitosis_var_lib_t
You can’t perform that action at this time.