diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-04-11 21:29:21 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-04-11 21:29:21 -0300 |
commit | 9a0618a6914ef2adaf59416d47f28e8ce125b168 (patch) | |
tree | 77f879b26ebe1570e46ccc9bd657eabdaeba7a57 | |
parent | 280cb7c481fd3c70b5c54c31c64ae05e187bc0ac (diff) | |
download | puppet-ikiwiki-9a0618a6914ef2adaf59416d47f28e8ce125b168.tar.gz puppet-ikiwiki-9a0618a6914ef2adaf59416d47f28e8ce125b168.tar.bz2 |
Leave ssh config to the end of manifest
-rw-r--r-- | manifests/instance.pp | 38 |
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": |