summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-12-27 14:23:51 -0200
committerSilvio Rhatto <rhatto@riseup.net>2009-12-27 14:23:51 -0200
commit1fd1d896a024a860bef7fa6c3b622df71e4a8017 (patch)
tree991f319088aa1a4e9e951be5beb6b1e933a6d28b /manifests/base.pp
parentbbc03d2c1069d42ea96101c54186e034b3a06f9b (diff)
Introducing sshd_internal_ip variable
Diffstat (limited to 'manifests/base.pp')
-rw-r--r--manifests/base.pp18
1 files changed, 12 insertions, 6 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 2ac2385..76203ee 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -14,14 +14,20 @@ class sshd::base {
'': { info("no sshrsakey on $fqdn") }
default: {
@@sshkey{"$hostname.$domain":
- type => ssh-rsa,
- key => $sshrsakey_key,
+ tag => "fqdn",
+ type => ssh-rsa,
+ key => $sshrsakey_key,
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,
+ }
}
}
}