# 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,
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",