Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / manifests / config.pp @ 321ae8ab

Historique | Voir | Annoter | Télécharger (512 octets)

1 0ba57c66 mh
# 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
      owner => root,
11
      group => root,
12
      mode  => '0640',
13
  } ~> Service['nftables']
14
15
  if $source {
16
    File["/etc/nftables/puppet/${name}.nft"]{
17
      source => $source,
18
    }
19
  } else {
20
    File["/etc/nftables/puppet/${name}.nft"]{
21
      content => $content,
22
    }
23
  }
24
}