aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/instance.pp23
1 files changed, 17 insertions, 6 deletions
diff --git a/manifests/instance.pp b/manifests/instance.pp
index 118aab8..8d59a10 100644
--- a/manifests/instance.pp
+++ b/manifests/instance.pp
@@ -47,12 +47,13 @@ define ikiwiki::instance(
require => File["${home}/.ssh"],
}
- file { "${ikiwiki::sites_folder}/${name}/${instance}_src":
- ensure => directory,
- owner => $owner,
- group => $group,
- recurse => true,
- notify => Exec["ikiwiki_refresh_${name}"],
+ if !defined(File["${ikiwiki::sites_folder}/${name}"]) {
+ file { "${ikiwiki::sites_folder}/${name}":
+ ensure => directory,
+ owner => root,
+ group => root,
+ mode => 0755,
+ }
}
if !defined(File["${ikiwiki::sites_folder}/${name}/${instance}"]) {
@@ -65,6 +66,16 @@ define ikiwiki::instance(
}
}
+ file { "${ikiwiki::sites_folder}/${name}/${instance}_src":
+ ensure => directory,
+ owner => $owner,
+ group => $group,
+ recurse => true,
+ notify => Exec["ikiwiki_refresh_${name}"],
+ require => File["${ikiwiki::sites_folder}/${name}"],
+ require => File["${ikiwiki::sites_folder}/${name}"],
+ }
+
if $create_ssh_key == true {
if !defined(File["${home}/.ssh"]) {
file { "${home}/.ssh":