summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-12-27 10:15:08 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-12-27 10:15:08 -0200
commitd31dba6a24a7e391ad5f64e48337709cad8c712f (patch)
tree40ac56486a35d37be16e334d390fd57b35d65825
parent9c486b3a1438ecc09ebc1c7e9d4566c4e18e066d (diff)
downloadpuppet-apache-d31dba6a24a7e391ad5f64e48337709cad8c712f.tar.gz
puppet-apache-d31dba6a24a7e391ad5f64e48337709cad8c712f.tar.bz2
Fixing docroot issue
-rw-r--r--manifests/init.pp30
1 files changed, 16 insertions, 14 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 360335f..8a02cc0 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -128,21 +128,23 @@ class apache {
case $ensure {
'present': {
- if !defined(File["${docroot}"]) {
- file { "${docroot}":
- ensure => present,
- owner => root,
- group => root,
- mode => 0755,
- recurse => false,
+ if $docroot != false {
+ if !defined(File["${docroot}"]) {
+ file { "${docroot}":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0755,
+ recurse => false,
+ }
}
- }
- if !defined(Exec["check_docroot_${docroot}"]) {
- # Ensure parent folder exist
- exec { "check_docroot_${docroot}":
- command => "/bin/mkdir -p ${docroot}",
- unless => "/bin/sh -c '[ -e ${docroot} ]'",
- before => File["${docroot}"],
+ if !defined(Exec["check_docroot_${docroot}"]) {
+ # Ensure parent folder exist
+ exec { "check_docroot_${docroot}":
+ command => "/bin/mkdir -p ${docroot}",
+ unless => "/bin/sh -c '[ -e ${docroot} ]'",
+ before => File["${docroot}"],
+ }
}
}
exec { "/usr/sbin/a2ensite $name":