diff options
author | Rehan Mahmood <rehanone@gmail.com> | 2021-05-01 12:27:46 -0400 |
---|---|---|
committer | Tim Meusel <tim@bastelfreak.de> | 2021-06-28 14:40:58 +0200 |
commit | d9d89ccd128137afaab85f751547b84e559b4744 (patch) | |
tree | 00e325b014d5003d86ff3d59471f9204fd994b30 | |
parent | c8fb22e2b9aae860917bf81e908ce6aa8183ee2c (diff) | |
download | puppet-ferm-d9d89ccd128137afaab85f751547b84e559b4744.tar.gz puppet-ferm-d9d89ccd128137afaab85f751547b84e559b4744.tar.bz2 |
Add support for opensuse
This however can only be done using `install_method = vcsrepo` as the ferm itself is not in the OS repos.
-rw-r--r-- | data/Suse.yaml | 4 | ||||
-rw-r--r-- | metadata.json | 6 | ||||
-rw-r--r-- | spec/classes/ferm_spec.rb | 11 |
3 files changed, 20 insertions, 1 deletions
diff --git a/data/Suse.yaml b/data/Suse.yaml new file mode 100644 index 0000000..cf5642b --- /dev/null +++ b/data/Suse.yaml @@ -0,0 +1,4 @@ +--- +ferm::configfile: /etc/ferm.conf +ferm::configdirectory: /etc/ferm.d +ferm::install_method: 'vcsrepo' diff --git a/metadata.json b/metadata.json index 466bb9e..4a2db35 100644 --- a/metadata.json +++ b/metadata.json @@ -54,6 +54,12 @@ ] }, { + "operatingsystem": "SLES", + "operatingsystemrelease": [ + "15" + ] + }, + { "operatingsystem": "Archlinux" }, { diff --git a/spec/classes/ferm_spec.rb b/spec/classes/ferm_spec.rb index 4ae75eb..e8afa73 100644 --- a/spec/classes/ferm_spec.rb +++ b/spec/classes/ferm_spec.rb @@ -16,7 +16,6 @@ describe 'ferm' do it { is_expected.to contain_class('ferm::config') } it { is_expected.to contain_class('ferm::service') } it { is_expected.to contain_class('ferm::install') } - it { is_expected.to contain_package('ferm').with_ensure('latest') } if facts[:os]['name'] == 'Debian' it { is_expected.to contain_file('/etc/ferm/ferm.d') } it { is_expected.to contain_file('/etc/ferm/ferm.d/definitions') } @@ -26,6 +25,13 @@ describe 'ferm' do it { is_expected.to contain_file('/etc/ferm.d/definitions') } it { is_expected.to contain_file('/etc/ferm.d/chains') } end + if facts[:os]['name'] == 'SLES' + it { is_expected.to contain_package('ferm').with_ensure('absent') } + it { is_expected.to contain_vcsrepo('/opt/ferm') } + else + it { is_expected.to contain_package('ferm').with_ensure('latest') } + it { is_expected.not_to contain_vcsrepo('/opt/ferm') } + end it { is_expected.not_to contain_service('ferm') } it { is_expected.not_to contain_file('/etc/ferm.conf') } @@ -193,6 +199,9 @@ describe 'ferm' do it { is_expected.to contain_package('perl').with_ensure('present') } it { is_expected.to contain_package('make').with_ensure('present') } it { is_expected.to contain_package('ferm').with_ensure('absent') } + it { is_expected.to contain_exec('make install') } + it { is_expected.to contain_file('/etc/ferm') } + it { is_expected.to contain_vcsrepo('/opt/ferm') } end end end |