aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-11 18:59:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-11 18:59:11 -0300
commit76fac0c7bf97028adf9f68c9e9bab639171e32f2 (patch)
tree2e63fcd6d3fac929347b52434e4a5fb7e0b3b4ab
parent3c012df370324fc8aea01972fb4b3e723622aa9b (diff)
downloadpuppet-ikiwiki-76fac0c7bf97028adf9f68c9e9bab639171e32f2.tar.gz
puppet-ikiwiki-76fac0c7bf97028adf9f68c9e9bab639171e32f2.tar.bz2
Managing top level if needed
-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":