root / manifests / config.pp @ a074dec2
Historique | Voir | Annoter | Télécharger (537 octets)
1 |
# manage a config snippet |
---|---|
2 |
define nftables::config( |
3 |
Optional[String] |
4 |
$content = undef, |
5 |
Optional[Variant[String,Array[String,1]]] |
6 |
$source = undef, |
7 |
){ |
8 |
Package['nftables'] -> file{ |
9 |
"/etc/nftables/puppet/${name}.nft": |
10 |
ensure => file, |
11 |
owner => root, |
12 |
group => root, |
13 |
mode => '0640', |
14 |
} ~> Service['nftables'] |
15 |
|
16 |
if $source { |
17 |
File["/etc/nftables/puppet/${name}.nft"]{ |
18 |
source => $source, |
19 |
} |
20 |
} else { |
21 |
File["/etc/nftables/puppet/${name}.nft"]{ |
22 |
content => $content, |
23 |
} |
24 |
} |
25 |
} |