diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-12-27 10:15:08 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-12-27 10:15:08 -0200 |
commit | d31dba6a24a7e391ad5f64e48337709cad8c712f (patch) | |
tree | 40ac56486a35d37be16e334d390fd57b35d65825 | |
parent | 9c486b3a1438ecc09ebc1c7e9d4566c4e18e066d (diff) | |
download | puppet-apache-d31dba6a24a7e391ad5f64e48337709cad8c712f.tar.gz puppet-apache-d31dba6a24a7e391ad5f64e48337709cad8c712f.tar.bz2 |
Fixing docroot issue
-rw-r--r-- | manifests/init.pp | 30 |
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": |