12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- - name: Create gitolite group
- group: name=git state=present
-
- - name: Create gitolite user
- user: name=git state=present home=/home/git system=yes group=git
-
- - name: Add www-data to the git group
- user: name=www-data groups=git append=yes
-
- - name: Download gitolite release
- git: repo=git://github.com/sitaramc/gitolite
- dest=/home/git/gitolite
- version=v{{ gitolite_version }}
-
- - name: Give git user file permissions
- file: path=/home/git/gitolite
- state=directory
- recurse=yes
- owner=git
- group=git
-
- - name: Install gitolite
- command: ./gitolite/install -ln /usr/local/bin
- chdir=/home/git
- creates=/usr/local/bin/gitolite
-
- - name: Copy .gitolite.rc file
- copy: src=home_git_.gitolite.rc
- dest=/home/git/.gitolite.rc
- group=git
- owner=git
- mode=0644
-
- - name: Copy SSH public key to server
- copy: src=gitolite.pub
- dest=/home/git/{{ main_user_name }}.pub
- group=git
- owner=git
- mode=0644
-
- - name: Setup gitolite
- command: su - git -c 'gitolite setup -pk {{ main_user_name }}.pub'
- chdir=/home/git
|