aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-10 16:15:19 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-10 16:15:19 -0300
commit6e8d73eb57d818bd441414c4b98a10fbf1ef1d56 (patch)
tree782436ff1444af3bf11e5d088a0ec3a45c6a3ccf
parenta417373bb73e90799e7a5059d493f0f66f3f2a42 (diff)
downloadpuppet-ikiwiki-6e8d73eb57d818bd441414c4b98a10fbf1ef1d56.tar.gz
puppet-ikiwiki-6e8d73eb57d818bd441414c4b98a10fbf1ef1d56.tar.bz2
Make sure that .ssh folder exists
-rw-r--r--manifests/instance.pp11
1 files changed, 11 insertions, 0 deletions
diff --git a/manifests/instance.pp b/manifests/instance.pp
index d797f2e..ba0db0d 100644
--- a/manifests/instance.pp
+++ b/manifests/instance.pp
@@ -30,6 +30,7 @@ define ikiwiki::instance($base_url = $domain, $ensure = 'present', $description
creates => "${ikiwiki::sites_folder}/${name}/.ssh/id_rsa",
user => $owner,
group => $group,
+ require => File["${ikiwiki::sites_folder}/${name}/.ssh"],
}
if !defined(File["${ikiwiki::sites_folder}/${name}/${instance}_src"]) {
@@ -53,6 +54,16 @@ define ikiwiki::instance($base_url = $domain, $ensure = 'present', $description
}
}
+ if !defined(File["${ikiwiki::sites_folder}/${name}/.ssh"]) {
+ file { "${ikiwiki::sites_folder}/${name}/.ssh":
+ ensure => directory,
+ owner => $owner,
+ group => $group,
+ mode => 0700,
+ require => File["${ikiwiki::sites_folder}/${name}"],
+ }
+ }
+
if !defined(File["${ikiwiki::sites_folder}/${name}"]) {
file { "${ikiwiki::sites_folder}/${name}":
ensure => directory,