Révision 8f4434ed
Install netbase for /etc/services on Ubuntu 20.04
On Ubuntu 20.04 only the nftables package no longer depends on netbase.
The result is the required `/etc/services` file is not installed.
Always install `netbase` on Ubuntu 20.04
manifests/init.pp | ||
---|---|---|
159 | 159 |
ensure => installed, |
160 | 160 |
} |
161 | 161 |
|
162 |
# /etc/services file is needed, on newer OSes this is a dependency on nftables |
|
163 |
if $facts['os']['name'] == 'Ubuntu' and $facts['os']['release']['major'] == '20.04' { |
|
164 |
package { 'netbase': |
|
165 |
ensure => present, |
|
166 |
} |
|
167 |
} |
|
168 |
|
|
162 | 169 |
if $clobber_default_config { |
163 | 170 |
file { $configuration_path: |
164 | 171 |
ensure => file, |
spec/classes/nftables_spec.rb | ||
---|---|---|
33 | 33 |
|
34 | 34 |
it { is_expected.to contain_package('nftables') } |
35 | 35 |
|
36 |
case [os_facts[:os]['name'], os_facts[:os]['release']['major']] |
|
37 |
when ['Ubuntu', '20.04'] |
|
38 |
it { is_expected.to contain_package('netbase') } |
|
39 |
else |
|
40 |
it { is_expected.not_to contain_package('netbase') } |
|
41 |
end |
|
42 |
|
|
36 | 43 |
context 'with clobber_default_config false' do |
37 | 44 |
let(:params) do |
38 | 45 |
{ clobber_default_config: false } |
Formats disponibles : Unified diff