Révision 11bf7237
lint_fix results
manifests/rules/snat4.pp | ||
---|---|---|
1 | 1 |
# manage a ipv4 snat rule |
2 |
define nftables::rules::snat4( |
|
2 |
define nftables::rules::snat4 (
|
|
3 | 3 |
String[1] |
4 |
$snat,
|
|
4 |
$snat, |
|
5 | 5 |
Pattern[/^[a-zA-Z0-9_]+$/] |
6 |
$rulename = $title,
|
|
6 |
$rulename = $title, |
|
7 | 7 |
Pattern[/^\d\d$/] |
8 |
$order = '70',
|
|
8 |
$order = '70', |
|
9 | 9 |
String[1] |
10 |
$chain = 'POSTROUTING',
|
|
10 |
$chain = 'POSTROUTING', |
|
11 | 11 |
Optional[String[1]] |
12 |
$oif = undef,
|
|
12 |
$oif = undef, |
|
13 | 13 |
Optional[String[1]] |
14 |
$saddr = undef,
|
|
14 |
$saddr = undef, |
|
15 | 15 |
Optional[Enum['tcp','udp']] |
16 |
$proto = undef,
|
|
16 |
$proto = undef, |
|
17 | 17 |
Optional[Variant[String,Integer[1,65535]]] |
18 |
$dport = undef,
|
|
18 |
$dport = undef, |
|
19 | 19 |
Enum['present','absent'] |
20 |
$ensure = 'present',
|
|
20 |
$ensure = 'present', |
|
21 | 21 |
) { |
22 |
|
|
23 | 22 |
$oifname = $oif ? { |
24 | 23 |
undef => '', |
25 | 24 |
default => "oifname ${oif} ", |
... | ... | |
43 | 42 |
$port = '' |
44 | 43 |
} |
45 | 44 |
|
46 |
nftables::rule{ |
|
45 |
nftables::rule {
|
|
47 | 46 |
"${chain}-${rulename}": |
48 | 47 |
ensure => $ensure, |
49 | 48 |
table => 'ip-nat', |
Formats disponibles : Unified diff