summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-11-08 13:58:55 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-11-08 13:58:55 -0200
commit5253b1335ef5974fb31b00faec70738e43a9857b (patch)
tree62d91ba61d82cbb7a42d8cd113638127a57926f5
parent7af38edb568033153c4a8a7696cf77bbea117e02 (diff)
downloadpuppet-apache-5253b1335ef5974fb31b00faec70738e43a9857b.tar.gz
puppet-apache-5253b1335ef5974fb31b00faec70738e43a9857b.tar.bz2
Docroot back as a normal resource, but testing for multiple definitions
-rw-r--r--manifests/init.pp16
1 files changed, 7 insertions, 9 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 287b2f5..f8dd454 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -108,12 +108,13 @@ class apache {
&& [ ${apache2_sites}-enabled/$name -ef ${apache2_sites}-available/$name ]'",
notify => Exec["reload-apache2"],
}
- @file { "${docroot}":
- ensure => directory,
- owner => root,
- group => root,
- mode => 0755,
- tag => "apache_docroot",
+ if !defined(File["${docroot}"]) {
+ file { "${docroot}":
+ ensure => directory,
+ owner => root,
+ group => root,
+ mode => 0755,
+ }
}
}
'absent': {
@@ -166,7 +167,4 @@ class apache {
command => "/etc/init.d/apache2 force-reload",
refreshonly => true,
}
-
- # Realize all docroot resources
- File <| tag == "apache_docroot" |>
}