summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorandreas <andreas@immerda.ch>2008-03-01 08:29:46 +0000
committerandreas <andreas@immerda.ch>2008-03-01 08:29:46 +0000
commitd3c5ec8144af745918a6dafc8bb98c38a4b8ef8a (patch)
tree342347350cbf697501d978434720d01b2e1c3586 /manifests/init.pp
parentf3ee3f0bf3c871d734f8f4b8102dce418da438f6 (diff)
test: err: Could not retrieve catalog: Duplicate definition: File[/etc/apache2//vhosts.d/] is already defined in file /var/lib/puppet/modules_src/apache/manifests/init.pp at line 102; cannot redefine at /var/lib/puppet/modules_src/apache/manifests/init.pp:102
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp51
1 files changed, 35 insertions, 16 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 286690b..3dea849 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -10,6 +10,24 @@ class apache {
ubuntu: { include apache::ubuntu }
default: { include apache::base }
}
+
+ $vhosts_dir = $operatingsystem ? {
+ centos => "$apache::centos::config_dir/vhosts.d/",
+ gentoo => "$apache::gentoo::config_dir/vhosts.d/",
+ debian => "$apache::debian::config_dir/vhosts.d/",
+ ubuntu => "$apache::ubuntu::config_dir/vhosts.d/",
+ openbsd => "$apache::openbsd::config_dir/vhosts.d/",
+ default => '/etc/apache2/vhosts.d/',
+ }
+
+ file{
+ $vhosts_dir:
+ ensure => directory,
+ owner => root,
+ group => 0,
+ mode => 0755,
+ require => Package[apache],
+ }
}
class apache::base {
@@ -84,22 +102,23 @@ define apache::vhost::file(
$source = '',
$destination = ''
){
- $vhosts_dir = $operatingsystem ? {
- centos => "$apache::centos::config_dir/vhosts.d/",
- gentoo => "$apache::gentoo::config_dir/vhosts.d/",
- debian => "$apache::debian::config_dir/vhosts.d/",
- ubuntu => "$apache::ubuntu::config_dir/vhosts.d/",
- openbsd => "$apache::openbsd::config_dir/vhosts.d/",
- default => '/etc/apache2/vhosts.d/',
- }
-
- file{$vhosts_dir:
- ensure => directory,
- owner => root,
- group => 0,
- mode => 0755,
- require => Package[apache],
- }
+# $vhosts_dir = $operatingsystem ? {
+# centos => "$apache::centos::config_dir/vhosts.d/",
+# gentoo => "$apache::gentoo::config_dir/vhosts.d/",
+# debian => "$apache::debian::config_dir/vhosts.d/",
+# ubuntu => "$apache::ubuntu::config_dir/vhosts.d/",
+# openbsd => "$apache::openbsd::config_dir/vhosts.d/",
+# default => '/etc/apache2/vhosts.d/',
+# }
+#
+# file{
+# $vhosts_dir:
+# ensure => directory,
+# owner => root,
+# group => 0,
+# mode => 0755,
+# require => Package[apache],
+# }
$real_destination = $destination ? {
'' => "${vhosts_dir}/${name}.conf",