diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-04-10 16:15:19 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-04-10 16:15:19 -0300 |
commit | 6e8d73eb57d818bd441414c4b98a10fbf1ef1d56 (patch) | |
tree | 782436ff1444af3bf11e5d088a0ec3a45c6a3ccf | |
parent | a417373bb73e90799e7a5059d493f0f66f3f2a42 (diff) | |
download | puppet-ikiwiki-6e8d73eb57d818bd441414c4b98a10fbf1ef1d56.tar.gz puppet-ikiwiki-6e8d73eb57d818bd441414c4b98a10fbf1ef1d56.tar.bz2 |
Make sure that .ssh folder exists
-rw-r--r-- | manifests/instance.pp | 11 |
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, |