summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/base.pp')
-rw-r--r--manifests/base.pp22
1 files changed, 14 insertions, 8 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 2ac2385..9aed1ba 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -10,18 +10,24 @@ class sshd::base {
}
# Now add the key, if we've got one
- case $sshrsakey_key {
+ case $sshrsakey {
'': { info("no sshrsakey on $fqdn") }
default: {
- @@sshkey{"$hostname.$domain":
- type => ssh-rsa,
- key => $sshrsakey_key,
+ @@sshkey{"$fqdn":
+ tag => "fqdn",
+ type => ssh-rsa,
+ key => $sshrsakey,
ensure => present,
}
- @@sshkey{"$ipaddress":
- type => ssh-rsa,
- key => $sshrsakey,
- ensure => present,
+ # In case the node has an internal network address,
+ # we don't define a sshkey resource using an IP address
+ if $sshd_internal_ip == "no" {
+ @@sshkey{"$ipaddress":
+ tag => "ipaddress",
+ type => ssh-rsa,
+ key => $sshrsakey,
+ ensure => present,
+ }
}
}
}