mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-26 03:23:08 +08:00
This will unify all the handlers to use first uppercase letter for ansible-lint to stop complaining. I went through all `notify:` occurrences and fixed them by running ``` set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep -rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g" ``` Then I went through all the changes and removed the ones that wasn't expected to be changed. Fixes https://pagure.io/fedora-infrastructure/issue/12391 Signed-off-by: Michal Konecny <mkonecny@redhat.com>
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
---
|
|
# tasklist for setting up a git server (git:// access)
|
|
|
|
- name: Install the git-daemon package
|
|
ansible.builtin.package: name=git-daemon state=present
|
|
tags: git/server
|
|
|
|
# If NOT using xinetd
|
|
- name: Delete stock git daemon config
|
|
ansible.builtin.file: path="/usr/lib/systemd/system/git.service" state=absent
|
|
when: ansible_distribution_major_version|int >= 7 and ansible_distribution == 'RedHat'
|
|
tags: git/server
|
|
|
|
- name: Delete stock git daemon config
|
|
ansible.builtin.file: path="/usr/lib/systemd/system/git.service" state=absent
|
|
when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora'
|
|
tags: git/server
|
|
|
|
- name: Configure git daemon
|
|
ansible.builtin.template: >
|
|
src="git@.service.j2"
|
|
dest="/usr/lib/systemd/system/git@.service"
|
|
mode=0644
|
|
when: ansible_distribution_major_version|int >= 7 and ansible_distribution == 'RedHat'
|
|
tags: git/server
|
|
|
|
- name: Configure git daemon
|
|
ansible.builtin.template: >
|
|
src="git@.service.j2"
|
|
dest="/usr/lib/systemd/system/git@.service"
|
|
mode=0644
|
|
when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora'
|
|
tags: git/server
|
|
|
|
# If using xinetd
|
|
- name: Install xinetd
|
|
ansible.builtin.package: name=xinetd state=present
|
|
when: ansible_distribution_major_version|int == 6 and ansible_distribution == 'RedHat'
|
|
tags: git/server
|
|
|
|
- name: Install the xinetd config file
|
|
ansible.builtin.template: >
|
|
src="git.j2"
|
|
dest="/etc/xinetd.d/git"
|
|
mode=0644
|
|
when: ansible_distribution_major_version|int == 6 and ansible_distribution == 'RedHat'
|
|
tags: git/server
|
|
notify:
|
|
- Restart xinetd
|