Puppet Class: nftables::rules::out::puppet

Defined in:
manifests/rules/out/puppet.pp

Summary

manage outgoing puppet

Overview

Parameters:

  • puppetserver (Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]])

    puppetserver hostname

  • puppetserver_port (Stdlib::Port) (defaults to: 8140)

    puppetserver port



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'manifests/rules/out/puppet.pp', line 5

class nftables::rules::out::puppet (
  Variant[Stdlib::IP::Address,Array[Stdlib::IP::Address,1]] $puppetserver,
  Stdlib::Port $puppetserver_port = 8140,
) {
  Array($puppetserver, true).each |$index,$ps| {
    nftables::rule {
      "default_out-puppet-${index}":
    }
    if $ps =~ Stdlib::IP::Address::V6 {
      Nftables::Rule["default_out-puppet-${index}"] {
        content => "ip6 daddr ${ps} tcp dport ${puppetserver_port} accept",
      }
    } else {
      Nftables::Rule["default_out-puppet-${index}"] {
        content => "ip daddr ${ps} tcp dport ${puppetserver_port} accept",
      }
    }
  }
}