From: Peter Palfrader Date: Sat, 7 Sep 2019 15:08:24 +0000 (+0200) Subject: Define public IP addresses in base since we cannot trust facter X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=0138dbc335a697fae4cd7ac765776857582cef41 Define public IP addresses in base since we cannot trust facter --- diff --git a/manifests/site.pp b/manifests/site.pp index 0c178c135..3e4e39d67 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -21,6 +21,7 @@ Service { node default { # we really should rename this one include site + include base # this is magic: it will include whatever classes says we should # include, based on the value of the "classes" array diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp index 986db5a23..413c66785 100644 --- a/modules/base/manifests/init.pp +++ b/modules/base/manifests/init.pp @@ -1,4 +1,9 @@ -class base { +class base( + Stdlib::IP::Address $public_address = filter_ipv4(getfromhash($site::nodeinfo, 'ldap', 'ipHostNumber'))[0], + Optional[Stdlib::IP::Address] $public_address6 = filter_ipv6(getfromhash($site::nodeinfo, 'ldap', 'ipHostNumber'))[0], +) { + $public_addresses = [ $public_address, $public_address6 ] + include munin include syslog_ng include sudo