67 lines
1.4 KiB
YAML
67 lines
1.4 KiB
YAML
---
|
|
|
|
- name: install git server packages
|
|
ansible.builtin.package:
|
|
name: "{{ item }}"
|
|
state: installed
|
|
with_items:
|
|
- gitweb
|
|
- highlight
|
|
- perl-Digest-MD5
|
|
|
|
- name: fix selinux context from data directory
|
|
community.general.sefcontext:
|
|
path: /export/git(/.*)?
|
|
setype: git_sys_content_t
|
|
|
|
- name: create git directory
|
|
ansible.builtin.file:
|
|
path: /export/git
|
|
state: directory
|
|
mode: 0755
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
|
|
- name: link git directory
|
|
ansible.builtin.file:
|
|
path: /srv/git
|
|
src: /export/git
|
|
state: link
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
|
|
- name: create gitweb config
|
|
ansible.builtin.copy:
|
|
dest: /etc/gitweb.conf
|
|
src: gitweb.conf
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
|
|
- name: create robots.txt
|
|
ansible.builtin.copy:
|
|
dest: /var/www/git/robots.txt
|
|
content: "User-agent: *\nDisallow:\n"
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
|
|
- name: copy local layout files
|
|
ansible.builtin.copy:
|
|
dest: "/var/www/git/static/{{ item }}"
|
|
src: "{{ item }}"
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
with_items:
|
|
- logo.png
|
|
- gitweb-local.css
|
|
|
|
- name: create apache git config
|
|
ansible.builtin.copy:
|
|
dest: /etc/httpd/conf.local.d/git.conf
|
|
src: git.conf
|
|
mode: 0644
|
|
owner: root
|
|
group: "{{ ansible_wheel }}"
|
|
notify: restart apache
|