diff options
-rw-r--r-- | manifests/init.pp | 7 |
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", |