Projet

Général

Profil

Révision 331b8d85

ID331b8d85f7c38b6dbfe602f75d6c9831b1534694
Parent 753540f1
Enfant 77503f49

Ajouté par Steve Traylen il y a plus de 2 ans

New nftables::file type to include raw file

For example:

```puppet
nftables::file{'geoip':
content => "include \"/files/geoipsets/dbip/*.ipv4\"\n",
}
```

will right a file or content into the nftables configuration.

The file written will be included in configuration.

Fixes #146

Voir les différences:

spec/classes/nftables_spec.rb
46 46
      }
47 47

  
48 48
      it {
49
        expect(subject).to contain_file('/etc/nftables/puppet.nft').with(
50
          content: %r{^include "file-\*\.nft"$}
51
        )
52
      }
53

  
54
      it {
49 55
        expect(subject).to contain_file('/etc/nftables/puppet').with(
50 56
          ensure: 'directory',
51 57
          owner: 'root',
......
68 74
      }
69 75

  
70 76
      it {
77
        expect(subject).to contain_file('/etc/nftables/puppet-preflight.nft').with(
78
          content: %r{^include "file-\*\.nft"$}
79
        )
80
      }
81

  
82
      it {
71 83
        expect(subject).to contain_file('/etc/nftables/puppet-preflight').with(
72 84
          ensure: 'directory',
73 85
          owner: 'root',

Formats disponibles : Unified diff