root / manifests / rules / out / puppet.pp @ 31b17627
Historique | Voir | Annoter | Télécharger (583 octets)
1 | ee1cf60a | mh | # manage outgoing puppet |
---|---|---|---|
2 | 11bf7237 | Steve Traylen | class nftables::rules::out::puppet ( |
3 | 31b17627 | Steve Traylen | Variant[String,Array[String,1]] $puppetmaster, |
4 | Integer $puppetserver_port = 8140, |
||
5 | ee1cf60a | mh | ) { |
6 | any2array($puppetmaster).each |$index,$pm| { |
||
7 | 11bf7237 | Steve Traylen | nftables::rule { |
8 | ee1cf60a | mh | "default_out-puppet-${index}": |
9 | } |
||
10 | if $pm =~ /:/ { |
||
11 | 11bf7237 | Steve Traylen | Nftables::Rule["default_out-puppet-${index}"] { |
12 | ee1cf60a | mh | content => "ip6 daddr ${pm} tcp dport ${puppetserver_port} accept", |
13 | } |
||
14 | } else { |
||
15 | 11bf7237 | Steve Traylen | Nftables::Rule["default_out-puppet-${index}"] { |
16 | ee1cf60a | mh | content => "ip daddr ${pm} tcp dport ${puppetserver_port} accept", |
17 | } |
||
18 | } |
||
19 | } |
||
20 | } |