aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie McClelland <jm@mayfirst.org>2011-03-19 11:31:59 -0400
committerJamie McClelland <jm@mayfirst.org>2011-03-19 11:31:59 -0400
commit6356f78198821c2e363b65a55c987929eeee178a (patch)
tree7612cd89f5b960ac192edbb16e411fd1d4962366
parent780ea534acbd062353f61dd0c123c3afde9a3f97 (diff)
downloadpuppet-monkeysphere-6356f78198821c2e363b65a55c987929eeee178a.tar.gz
puppet-monkeysphere-6356f78198821c2e363b65a55c987929eeee178a.tar.bz2
redefining a var generates an error.
-rw-r--r--manifests/init.pp7
1 files changed, 3 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 407313b..7ecf5a1 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -20,11 +20,10 @@
# Class for monkeysphere management
#
-class monkeysphere {
+class monkeysphere inherits monkeysphere::defaults {
# The needed packages
package { monkeysphere: ensure => installed, }
- include monkeysphere::defaults
file {
"/etc/monkeysphere/monkeysphere.conf":
mode => 644,
@@ -55,12 +54,12 @@ class monkeysphere::defaults {
define monkeysphere::import_key ( $scheme = 'ssh://', $port = '', $path = '/etc/ssh/ssh_host_rsa_key', $hostname = $fqdn ) {
# if we're getting a port number, prefix with a colon so it's valid
- $port = $port ? {
+ $prefixed_port = $port ? {
'' => '',
default => ":$port"
}
- $key = "${schema}://${fqdn}${port}"
+ $key = "${schema}://${fqdn}${prefixed_port}"
exec { "monkeysphere-host import-key $path $key":
alias => "monkeysphere-import-key",