aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/service.pp5
-rw-r--r--metadata.json8
-rw-r--r--spec/classes/ferm_spec.rb10
3 files changed, 22 insertions, 1 deletions
diff --git a/manifests/service.pp b/manifests/service.pp
index ddc6129..f19997f 100644
--- a/manifests/service.pp
+++ b/manifests/service.pp
@@ -18,6 +18,11 @@ class ferm::service {
line => 'ENABLED="yes"',
match => 'ENABLED=',
}
+ file_line{'disable_ferm_cache':
+ path => '/etc/default/ferm',
+ line => 'CACHE="no"',
+ match => 'CACHE=',
+ }
}
}
}
diff --git a/metadata.json b/metadata.json
index 5eb2532..00f8141 100644
--- a/metadata.json
+++ b/metadata.json
@@ -48,6 +48,14 @@
]
},
{
+ "operatingsystem": "Ubuntu",
+ "operatingsystemrelease": [
+ "14.04",
+ "16.04",
+ "18.04"
+ ]
+ },
+ {
"operatingsystem": "Fedora",
"operatingsystemrelease": [
"26"
diff --git a/spec/classes/ferm_spec.rb b/spec/classes/ferm_spec.rb
index e039c14..0f9f854 100644
--- a/spec/classes/ferm_spec.rb
+++ b/spec/classes/ferm_spec.rb
@@ -31,14 +31,22 @@ describe 'ferm' do
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_service('ferm') }
+ if facts[:os]['name'] == 'Ubuntu'
+ it { is_expected.to contain_file_line('enable_ferm') }
+ it { is_expected.to contain_file_line('disable_ferm_cache') }
+ end
end
context 'with managed configfile' do
let :params do
{ manage_configfile: true }
end
+ if facts[:os]['name'] == 'Ubuntu'
+ it { is_expected.to contain_concat('/etc/ferm/ferm.conf') }
+ else
+ it { is_expected.to contain_concat('/etc/ferm.conf') }
+ end
it { is_expected.to compile.with_all_deps }
- it { is_expected.to contain_concat('/etc/ferm.conf') }
it { is_expected.to contain_concat__fragment('ferm_header.conf') }
it { is_expected.to contain_concat__fragment('ferm.conf') }
end