aboutsummaryrefslogblamecommitdiffstats
path: root/roles/git/tasks/main.yml
blob: e8fc0e0991a92f44e24dfb2652102f13bb5523f8 (plain) (tree)
1
2
3
4
5
6
7
8
9





                                 

                        
                           

                  

                       

                            

                                

                                 


                            
                    
              
 












                                                                 

# git ~~ roles/git/tasks/main.yml
# Init git user and settings

---

- name: create git group
  group:
    name: "{{ git_group }}"
    state: present

- name: create git user
  user:
    name: "{{ git_user }}"
    group: "{{ git_group }}"
    shell: "{{ path_gitshell }}"

- name: create git-only directory
  file:
    path: "{{ git_dir }}"
    owner: "{{ git_user }}"
    group: "{{ git_group }}"
    state: directory
    mode: 0750

# openbsd only
- name: enable gitdaemon
  lineinfile:
    path: /etc/rc.conf.local
    regexp: "^gitdaemon_flags="
    line: "gitdaemon_flags=--reuseaddr --base-path={{ git_dir }}"

- name: start gitdaemon
  service:
    name: gitdaemon
    state: restarted


remember that computers suck.