summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-02-08 15:06:06 +0000
committermh <mh@immerda.ch>2008-02-08 15:06:06 +0000
commitf1558bb97f041bb22bc3a72af89c61eb29fc70b6 (patch)
treee602fe73614c4931a1aae30ba66791f39888392b /manifests/init.pp
parent730ded7fc14e6e38cc4b9b07b7c32816ee7cfde0 (diff)
fixed class inheritance
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp18
1 files changed, 10 insertions, 8 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 2251c6e..16367be 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -3,6 +3,14 @@
# License: GPLv3
class apache {
+ case $operatingsystem {
+ centos: { include apache::centos }
+ gentoo: { include apache::gentoo }
+ default: { include apache::base }
+ }
+}
+
+class apache::base {
package { 'apache':
name => 'apache',
ensure => present,
@@ -14,7 +22,6 @@ class apache {
ensure => running,
require => Package[apache],
}
-
file { 'default_apache_index':
path => '/var/www/localhost/index.html',
ensure => file,
@@ -24,17 +31,12 @@ class apache {
require => Package[apache],
content => template('apache/default/default_index.erb'),
}
-
- case $operatingsystem {
- centos: { include apache::centos }
- gentoo: { include apache::gentoo }
- }
}
### distro specific stuff
-class apache::centos {
+class apache::centos inherits apache::base{
Package[apache]{
name => 'httpd',
}
@@ -59,7 +61,7 @@ class apache::centos {
}
}
-class apache::gentoo {
+class apache::gentoo inherits apache::base {
Package[apache]{
category => 'www-servers',
}