diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2009-11-08 14:52:00 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2009-11-08 14:52:00 -0200 |
commit | 3b0758a469e5093c9b64205c3e15080b4e590b48 (patch) | |
tree | 2abb7e77143dbd0be294fe5a051e76c481feb81f /manifests | |
parent | 5e3f3ea7b0f230238116765f125db7fbf443a9c3 (diff) | |
download | puppet-apache-3b0758a469e5093c9b64205c3e15080b4e590b48.tar.gz puppet-apache-3b0758a469e5093c9b64205c3e15080b4e590b48.tar.bz2 |
Ensuring docroot parent folders
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 202a753..8a9a548 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -105,12 +105,17 @@ class apache { 'present': { if !defined(File["${docroot}"]) { file { "${docroot}": - ensure => directory, - owner => root, - group => root, - mode => 0755, + ensure => directory, + owner => root, + group => root, + mode => 0755, + recurse => true, } } + # Ensure parent folder exist + exec { "/bin/mkdir -p ${docroot}": + before => File["${docroot}"], + } exec { "/usr/sbin/a2ensite $name": unless => "/bin/sh -c '[ -L ${apache2_sites}-enabled/$name ] \ && [ ${apache2_sites}-enabled/$name -ef ${apache2_sites}-available/$name ]'", |