summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-11-08 14:52:00 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-11-08 14:52:00 -0200
commit3b0758a469e5093c9b64205c3e15080b4e590b48 (patch)
tree2abb7e77143dbd0be294fe5a051e76c481feb81f /manifests
parent5e3f3ea7b0f230238116765f125db7fbf443a9c3 (diff)
downloadpuppet-apache-3b0758a469e5093c9b64205c3e15080b4e590b48.tar.gz
puppet-apache-3b0758a469e5093c9b64205c3e15080b4e590b48.tar.bz2
Ensuring docroot parent folders
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp13
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 ]'",