From 9a0618a6914ef2adaf59416d47f28e8ce125b168 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 11 Apr 2013 21:29:21 -0300 Subject: Leave ssh config to the end of manifest --- manifests/instance.pp | 38 +++++++++++++++++++------------------- 1 file 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": -- cgit v1.2.3