git_server: ansible-lint fixes

This commit is contained in:
Timo Makinen 2022-10-30 17:18:25 +00:00
parent 1fb8d3b918
commit 9cb018c682

View file

@ -1,6 +1,5 @@
--- ---
- name: Install git server packages
- name: install git server packages
ansible.builtin.package: ansible.builtin.package:
name: "{{ item }}" name: "{{ item }}"
state: installed state: installed
@ -9,12 +8,12 @@
- highlight - highlight
- perl-Digest-MD5 - perl-Digest-MD5
- name: fix selinux context from data directory - name: Fix SELinux context from data directory
community.general.sefcontext: community.general.sefcontext:
path: /export/git(/.*)? path: /export/git(/.*)?
setype: git_sys_content_t setype: git_sys_content_t
- name: create git directory - name: Create git directory
ansible.builtin.file: ansible.builtin.file:
path: /export/git path: /export/git
state: directory state: directory
@ -22,7 +21,7 @@
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
- name: link git directory - name: Link git directory
ansible.builtin.file: ansible.builtin.file:
path: /srv/git path: /srv/git
src: /export/git src: /export/git
@ -30,7 +29,7 @@
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
- name: create gitweb config - name: Create gitweb config
ansible.builtin.copy: ansible.builtin.copy:
dest: /etc/gitweb.conf dest: /etc/gitweb.conf
src: gitweb.conf src: gitweb.conf
@ -38,7 +37,7 @@
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
- name: create robots.txt - name: Create robots.txt
ansible.builtin.copy: ansible.builtin.copy:
dest: /var/www/git/robots.txt dest: /var/www/git/robots.txt
content: "User-agent: *\nDisallow:\n" content: "User-agent: *\nDisallow:\n"
@ -46,7 +45,7 @@
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
- name: copy local layout files - name: Copy local layout files
ansible.builtin.copy: ansible.builtin.copy:
dest: "/var/www/git/static/{{ item }}" dest: "/var/www/git/static/{{ item }}"
src: "{{ item }}" src: "{{ item }}"
@ -57,11 +56,11 @@
- logo.png - logo.png
- gitweb-local.css - gitweb-local.css
- name: create apache git config - name: Create apache git config
ansible.builtin.copy: ansible.builtin.copy:
dest: /etc/httpd/conf.local.d/git.conf dest: /etc/httpd/conf.local.d/git.conf
src: git.conf src: git.conf
mode: 0644 mode: 0644
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
notify: restart apache notify: Restart apache