diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-03-24 11:16:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-03-24 11:16:26 -0300 |
commit | ea61a6019db1ad3fd592489a97a746e0f67622fe (patch) | |
tree | ad7e36614e37d5e18e684bf54be7557fc3977479 | |
parent | 6a096ca6216d4670db4c346692bb8b7356f7e941 (diff) | |
download | puppet-git-ea61a6019db1ad3fd592489a97a746e0f67622fe.tar.gz puppet-git-ea61a6019db1ad3fd592489a97a746e0f67622fe.tar.bz2 |
Autoload
-rw-r--r-- | manifests/daemon.pp | 10 | ||||
-rw-r--r-- | manifests/git.pp | 16 | ||||
-rw-r--r-- | manifests/gitolite.pp | 2 | ||||
-rw-r--r-- | manifests/gitosis.pp | 2 | ||||
-rw-r--r-- | manifests/gitweb.pp | 2 | ||||
-rw-r--r-- | manifests/init.pp | 19 |
6 files changed, 18 insertions, 33 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp index 546aae9..56e0430 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -1,19 +1,13 @@ -# 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 + include git::gitosis } default: { - include gitolite + include git::gitolite } } diff --git a/manifests/git.pp b/manifests/git.pp deleted file mode 100644 index 5a3763d..0000000 --- a/manifests/git.pp +++ /dev/null @@ -1,16 +0,0 @@ -# This class is the base for any other services handled by this module. - -class git { - # Obsolete - if !defined(Package['git-core']) { - package { 'git-core': - ensure => absent, - } - } - - if !defined(Package['git']) { - package { 'git': - ensure => latest, - } - } -} diff --git a/manifests/gitolite.pp b/manifests/gitolite.pp index 19474df..ecf3fa1 100644 --- a/manifests/gitolite.pp +++ b/manifests/gitolite.pp @@ -1,7 +1,7 @@ # This class handles a gitolite installation, with /var/git as the root for # git repositories. -class gitolite inherits git { +class git::gitolite inherits git { # directory for gitolite user and repositories file { "/var/git": ensure => directory, diff --git a/manifests/gitosis.pp b/manifests/gitosis.pp index c446918..a903c80 100644 --- a/manifests/gitosis.pp +++ b/manifests/gitosis.pp @@ -1,7 +1,7 @@ # This class handles a gitosis installation, with /var/git as the root for # git repositories. -class gitosis inherits git { +class git::gitosis inherits git { # directory for gitosis user and repositories file { "/var/git": ensure => directory, diff --git a/manifests/gitweb.pp b/manifests/gitweb.pp index 4399592..3453169 100644 --- a/manifests/gitweb.pp +++ b/manifests/gitweb.pp @@ -1,6 +1,6 @@ # This class handles a gitweb installation. -class gitweb( +class git::gitweb( $protocol = hiera('git::web::protocol', 'git'), $hosting_domain = hiera('apache::site::domain', $::domain), $implementation = hiera('git::daemon::implementation', 'gitolite') diff --git a/manifests/init.pp b/manifests/init.pp index e3bd908..2c49ea8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,7 +1,14 @@ -# The classes used by this module are imported here. +class git { + # Obsolete + if !defined(Package['git-core']) { + package { 'git-core': + ensure => absent, + } + } -import "git.pp" -import "gitosis.pp" -import "gitweb.pp" -import "daemon.pp" -import "gitolite.pp" + if !defined(Package['git']) { + package { 'git': + ensure => latest, + } + } +} |