Révision 331b8d85
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
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