Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / manifests / rules / out / puppet.pp @ 11bf7237

Historique | Voir | Annoter | Télécharger (587 octets)

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