Révision 3a52fb41
Richer dport
manifests/simplerule.pp | ||
---|---|---|
16 | 16 |
$action = 'accept', |
17 | 17 |
Optional[String] |
18 | 18 |
$comment = undef, |
19 |
Optional[Integer[1, 65535]]
|
|
19 |
Optional[Variant[Array[Stdlib::Port, 1], Stdlib::Port, Pattern[/\d+-\d+/]]]
|
|
20 | 20 |
$dport = undef, |
21 | 21 |
Optional[Enum['tcp', 'udp']] |
22 | 22 |
$proto = undef, |
23 | 23 |
){ |
24 | 24 |
|
25 |
if $dport and !$proto { |
|
26 |
fail('Specifying a transport protocol via $proto is mandatory when passing a port') |
|
27 |
} |
|
28 |
|
|
25 | 29 |
if $ensure == 'present' { |
26 | 30 |
nftables::rule{"${chain}-${rulename}": |
27 | 31 |
content => epp('nftables/simplerule.epp', |
Formats disponibles : Unified diff