aboutsummaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
authorTomas Barton <barton.tomas@gmail.com>2014-02-14 01:24:15 +0100
committerTomas Barton <barton.tomas@gmail.com>2014-02-14 01:24:15 +0100
commita6a05cd9fc019db127e18898b3ab3e624644a8b5 (patch)
tree2fd835132f9d5f33d80459d4eaaaa4d8039ae6f0 /manifests/base.pp
parent253e4f1ceddb8666281c207bb41af1e8a167ee0d (diff)
downloadpuppet-sshd-a6a05cd9fc019db127e18898b3ab3e624644a8b5.tar.gz
puppet-sshd-a6a05cd9fc019db127e18898b3ab3e624644a8b5.tar.bz2
custom ip address fact
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,