aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-04-10 17:52:13 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-04-10 17:52:13 -0300
commit97d8b8a37d6fa5be479ff8eb81117faad49c0c64 (patch)
tree4ffe2c622da809c6ea01b5436591973a0bc8adf9
parente41fc580d61696c3996abdabec1919be9afcf703 (diff)
downloadpuppet-ikiwiki-97d8b8a37d6fa5be479ff8eb81117faad49c0c64.tar.gz
puppet-ikiwiki-97d8b8a37d6fa5be479ff8eb81117faad49c0c64.tar.bz2
Adding home parameter
-rw-r--r--manifests/instance.pp13
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}"],
}
}