aboutsummaryrefslogtreecommitdiff
path: root/manifests/daemon.pp
blob: 546aae94e131fbbe14127efd748e3a9bf17a0f10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This class configures the git-daemon service. It ensures the packages is
# installed and a line is present in /etc/inetd.conf, which configures it.
# It depends on a "line" definition, which can be found here:
#
#   http://reductivelabs.com/trac/puppet/wiki/Recipes/SimpleText

class git::daemon (
  $implementation = hiera('git::daemon::implementation', 'gitolite')
) {

  case $implementation {
    'gitosis': {
      include gitosis
    }
    default: {
      include gitolite
    }
  }

  # the needed packages and services
  include inetd

  # git-daemon config in inetd
  line { "git-daemon-inetd":
    file   => "/etc/inetd.conf",
    line   => "git stream tcp nowait ${implementation} /usr/bin/git git daemon --inetd --verbose --base-path=/var/git/repositories /var/git/repositories",
    ensure => present,
  }
}