summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2008-11-01 11:33:12 +0000
committermh <mh@immerda.ch>2008-11-01 11:33:12 +0000
commit5eee97f1f33c1d722a799354192497d19f65b295 (patch)
tree76929ab37574e19c0b7a38760298bcea379f1f2b /manifests/init.pp
parentb26610a37cc5ef10a0e4342e2b2a2f91a78c7c52 (diff)
factored package stuff out, as openbsd doesn't have a package
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp33
1 files changed, 22 insertions, 11 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index cd6d468..9de7f3b 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -34,39 +34,50 @@ class apache::base {
file{'vhosts_dir':
path => '/etc/apache2/vhosts.d/',
ensure => directory,
- require => Package[apache],
owner => root, group => 0, mode => 0755;
}
file{'modules_dir':
path => '/etc/apache2/modules.d/',
ensure => directory,
- require => Package[apache],
owner => root, group => 0, mode => 0755;
}
- package { 'apache':
- name => 'apache',
- ensure => present,
- }
service { apache:
name => 'apache2',
enable => true,
ensure => running,
- require => Package[apache],
}
file { 'default_apache_index':
path => '/var/www/localhost/htdocs/index.html',
ensure => file,
- require => Package[apache],
content => template('apache/default/default_index.erb'),
owner => root, group => 0, mode => 0644;
}
}
+class apache::package inherits apache::base {
+ package { 'apache':
+ name => 'apache',
+ ensure => present,
+ }
+ File['vhosts_dir']{
+ require => Package[apache],
+ }
+ Servicei['apache']{
+ require => Package[apache],
+ }
+ File['default_apache_index']{
+ require => Package[apache],
+ }
+ File['modules_dir']{
+ require => Package[apache],
+ }
+}
+
### distribution specific classes
### centos
-class apache::centos inherits apache::base {
+class apache::centos inherits apache::package {
$config_dir = '/etc/httpd/'
Package[apache]{
@@ -91,7 +102,7 @@ class apache::centos inherits apache::base {
}
### gentoo
-class apache::gentoo inherits apache::base {
+class apache::gentoo inherits apache::package {
$config_dir = '/etc/apache2/'
# needs module gentoo
@@ -126,7 +137,7 @@ class apache::gentoo inherits apache::base {
}
### debian
-class apache::debian inherits apache::base {
+class apache::debian inherits apache::package {
$config_dir = '/etc/apache2/'
file {"$vhosts_dir":