Make rhel7 use git daemon, and rhel7 use xinet

This commit is contained in:
Patrick Uiterwijk 2015-02-19 17:12:27 +00:00
parent a2c6a6fad6
commit 5810a54f27
2 changed files with 31 additions and 5 deletions

View file

@ -1,16 +1,33 @@
---
# tasklist for setting up a git server (git:// access)
- name: install the needed packages
yum: pkg={{item}} state=present
with_items:
- git-daemon
- xinetd
- name: install the git-daemon package
yum: pkg=git-daemon state=present
# If NOT using xinetd
- name: delete stock git daemon config
file: path="/usr/lib/systemd/system/git.service" state=absent
when: ansible_distribution_major_version == '7'
- name: configure git daemon
template: >
src="git@.service.j2"
dest="/usr/lib/systemd/system/git@.service"
mode=0644
when: ansible_distribution_major_version == '7'
notify:
- restart git.socket
# If using xinetd
- name: install xinetd
yum: pkg=xinetd state=present
when: ansible_distribution_major_version == '6'
- name: install the xinetd config file
template: >
src="git.j2"
dest="/etc/xinetd.d/git"
mode=0644
when: ansible_distribution_major_version == '6'
notify:
- restart xinetd

View file

@ -0,0 +1,9 @@
[Unit]
Description=Git Repositories Server Daemon
Documentation=man:git-daemon(1)
Wants=git.socket
[Service]
User=nobody
ExecStart=/usr/libexec/git-core/git-daemon --base-path={{ git_basepath }} --export-all --user-path=public_git --syslog --inetd --verbose
StandardInput=socket