aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/instance.pp38
1 files changed, 19 insertions, 19 deletions
diff --git a/manifests/instance.pp b/manifests/instance.pp
index f845f68..4744bc9 100644
--- a/manifests/instance.pp
+++ b/manifests/instance.pp
@@ -58,25 +58,6 @@ define ikiwiki::instance(
require => File["${ikiwiki::sites_folder}/${name}"],
}
- if $create_ssh_key == true {
- if !defined(File["${home}/.ssh"]) {
- file { "${home}/.ssh":
- ensure => directory,
- owner => $owner,
- group => $group,
- mode => 0700,
- }
- }
-
- exec { "ssh-keygen-ikiwiki-${owner}":
- command => "ssh-keygen -t rsa -P '' -f ${home}/.ssh/id_rsa",
- creates => "${home}/.ssh/id_rsa",
- user => $owner,
- group => $group,
- require => File["${home}/.ssh"],
- }
- }
-
file { "${ikiwiki::git_folder}/${name}.git/hooks/post-update":
ensure => present,
owner => $owner,
@@ -96,6 +77,25 @@ define ikiwiki::instance(
"${ikiwiki::sites_folder}/${name}/ikiwiki",
"${ikiwiki::sites_folder}/${name}/ikiwiki_src"],
}
+
+ if $create_ssh_key == true {
+ if !defined(File["${home}/.ssh"]) {
+ file { "${home}/.ssh":
+ ensure => directory,
+ owner => $owner,
+ group => $group,
+ mode => 0700,
+ }
+ }
+
+ exec { "ssh-keygen-ikiwiki-${owner}":
+ command => "ssh-keygen -t rsa -P '' -f ${home}/.ssh/id_rsa",
+ creates => "${home}/.ssh/id_rsa",
+ user => $owner,
+ group => $group,
+ require => File["${home}/.ssh"],
+ }
+ }
}
'absent': {
file { "/etc/ikiwiki/$name.setup":