summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/base.pp')
-rw-r--r--manifests/base.pp8
1 files changed, 6 insertions, 2 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index a0f1872..a7a61a6 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -1,4 +1,6 @@
-class sshd::base {
+class sshd::base(
+ $ipaddres_fact = $sshd::ipaddres_fact,
+) {
$sshd_config_content = $::lsbdistcodename ? {
'' => template("sshd/sshd_config/${::operatingsystem}.erb"),
@@ -27,8 +29,10 @@ class sshd::base {
}
# In case the node has uses a shared network address,
# we don't define a sshkey resource using an IP address
+ $ipaddr = inline_template("<%= scope.lookupvar(ipaddr_fact) %>")
if $sshd::shared_ip == 'no' {
- @@sshkey{$::ipaddress:
+ @@sshkey{$ipaddr:
+
ensure => present,
tag => 'ipaddress',
type => ssh-rsa,