diff options
author | mh <mh@immerda.ch> | 2017-08-03 10:17:00 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2017-08-03 10:17:00 +0200 |
commit | 4b9c6e1714857a702add52b1176eb65d347ac71d (patch) | |
tree | be026a79827f0ac4e29f793c6b5d20008e17ce04 /manifests/rules | |
parent | b92b6930ca6c10c89b8f59cce393643eb32248e5 (diff) |
make it possible to set v6 and v6 puppetserver
Diffstat (limited to 'manifests/rules')
-rw-r--r-- | manifests/rules/puppet.pp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/manifests/rules/puppet.pp b/manifests/rules/puppet.pp index ee920b0..6cb0282 100644 --- a/manifests/rules/puppet.pp +++ b/manifests/rules/puppet.pp @@ -1,12 +1,30 @@ # outgoing puppet params class shorewall::rules::puppet( - $puppetserver = "puppet.${::domain}", - $puppetserver_port = 8140, + $puppetserver = "puppet.${::domain}", + $puppetserver_v6 = undef, + $puppetserver_port = 8140, $puppetserver_signport = 8141 ){ - shorewall::params4{ - 'PUPPETSERVER': value => $puppetserver; + shorewall::params{ 'PUPPETSERVER_PORT': value => $puppetserver_port; 'PUPPETSERVER_SIGN_PORT': value => $puppetserver_signport; } + if is_ipv4_address($puppetserver){ + shorewall::params4{ + 'PUPPETSERVER': value => $puppetserver; + } + if $puppetserver_v6 { + shorewall::params6{ + 'PUPPETSERVER': value => $puppetserver; + } + } + } elsif is_ipv6_address($puppetserver){ + shorewall::params6{ + 'PUPPETSERVER': value => $puppetserver; + } + } else { + shorewall::params{ + 'PUPPETSERVER': value => $puppetserver; + } + } } |