summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-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 ]'",