diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-04-10 17:52:13 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-04-10 17:52:13 -0300 |
commit | 97d8b8a37d6fa5be479ff8eb81117faad49c0c64 (patch) | |
tree | 4ffe2c622da809c6ea01b5436591973a0bc8adf9 | |
parent | e41fc580d61696c3996abdabec1919be9afcf703 (diff) | |
download | puppet-ikiwiki-97d8b8a37d6fa5be479ff8eb81117faad49c0c64.tar.gz puppet-ikiwiki-97d8b8a37d6fa5be479ff8eb81117faad49c0c64.tar.bz2 |
Adding home parameter
-rw-r--r-- | manifests/instance.pp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/manifests/instance.pp b/manifests/instance.pp index 28add12..31a6431 100644 --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -1,7 +1,7 @@ define ikiwiki::instance($base_url = $domain, $ensure = 'present', $description = false, $adminuser = 'yourname', $adminemail = 'me@example.org', $instance = 'ikiwiki', $account_creation_password = false, $add_plugins = false, $disable_plugins = false, - $protocol = 'https', $owner = $name, $group = $name) { + $protocol = 'https', $owner = $name, $group = $name, $home = "/home/$name") { $desc = $description ? { false => $title, @@ -26,11 +26,11 @@ define ikiwiki::instance($base_url = $domain, $ensure = 'present', $description } exec { "ssh-keygen-ikiwiki-${name}_${instance}": - command => "ssh-keygen -t rsa -P '' -f ${ikiwiki::sites_folder}/${name}/.ssh/id_rsa", - creates => "${ikiwiki::sites_folder}/${name}/.ssh/id_rsa", + command => "ssh-keygen -t rsa -P '' -f ${home}/.ssh/id_rsa", + creates => "${home}/.ssh/id_rsa", user => $owner, group => $group, - require => File["${ikiwiki::sites_folder}/${name}/.ssh"], + require => File["${home}/.ssh"], } if !defined(File["${ikiwiki::sites_folder}/${name}/${instance}_src"]) { @@ -54,13 +54,12 @@ define ikiwiki::instance($base_url = $domain, $ensure = 'present', $description } } - if !defined(File["${ikiwiki::sites_folder}/${name}/.ssh"]) { - file { "${ikiwiki::sites_folder}/${name}/.ssh": + if !defined(File["${home}/.ssh"]) { + file { "${home}/.ssh": ensure => directory, owner => $owner, group => $group, mode => 0700, - require => File["${ikiwiki::sites_folder}/${name}"], } } |