aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/daemon.pp10
-rw-r--r--manifests/git.pp16
-rw-r--r--manifests/gitolite.pp2
-rw-r--r--manifests/gitosis.pp2
-rw-r--r--manifests/gitweb.pp2
-rw-r--r--manifests/init.pp19
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,
+ }
+ }
+}