Projet

Général

Profil

Révision ee1cf60a

IDee1cf60ae4f969af2965a711e1573de0c6368bf1
Parent cd664666
Enfant 188e569f

Ajouté par mh il y a plus de 4 ans

add outgoing puppet

Voir les différences:

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

Formats disponibles : Unified diff