|
|
|
|
@ -17,9 +17,33 @@
|
|
|
|
|
gitweb_root: /home/gitweb/projects |
|
|
|
|
gitweb_stylesheet: custom_highlighting.css |
|
|
|
|
block: |
|
|
|
|
- name: make hash of a random password |
|
|
|
|
set_fact: |
|
|
|
|
gitweb_pass: "{{ lookup('password', |
|
|
|
|
'/dev/null length=15 chars=ascii_letters') |
|
|
|
|
| password_hash('sha512') }}" |
|
|
|
|
|
|
|
|
|
- name: add gitweb user |
|
|
|
|
user: |
|
|
|
|
name: "{{ gitweb_user }}" |
|
|
|
|
password: "{{ gitweb_pass }}" |
|
|
|
|
shell: /usr/bin/git-shell |
|
|
|
|
|
|
|
|
|
- name: create ssh directory |
|
|
|
|
file: |
|
|
|
|
state: directory |
|
|
|
|
mode: 0700 |
|
|
|
|
owner: "{{ gitweb_user }}" |
|
|
|
|
path: "/home/{{ gitweb_user }}/.ssh" |
|
|
|
|
|
|
|
|
|
- name: copy ssh_pubkey for gitweb user |
|
|
|
|
copy: |
|
|
|
|
remote_src: yes |
|
|
|
|
src: /root/.ssh/authorized_keys |
|
|
|
|
dest: "/home/{{ gitweb_user }}/.ssh/authorized_keys" |
|
|
|
|
owner: "{{ gitweb_user }}" |
|
|
|
|
group: "{{ gitweb_user }}" |
|
|
|
|
mode: 0600 |
|
|
|
|
|
|
|
|
|
- name: create project directory |
|
|
|
|
file: |
|
|
|
|
|