]> gitweb.fluxo.info Git - puppet-ferm.git/commitdiff
Add support for opensuse
authorRehan Mahmood <rehanone@gmail.com>
Sat, 1 May 2021 16:27:46 +0000 (12:27 -0400)
committerTim Meusel <tim@bastelfreak.de>
Mon, 28 Jun 2021 12:40:58 +0000 (14:40 +0200)
This however can only be done using `install_method = vcsrepo` as the ferm itself is not in the OS repos.

data/Suse.yaml [new file with mode: 0644]
metadata.json
spec/classes/ferm_spec.rb

diff --git a/data/Suse.yaml b/data/Suse.yaml
new file mode 100644 (file)
index 0000000..cf5642b
--- /dev/null
@@ -0,0 +1,4 @@
+---
+ferm::configfile: /etc/ferm.conf
+ferm::configdirectory: /etc/ferm.d
+ferm::install_method: 'vcsrepo'
index 466bb9e8724e889bebf9ded8aa38266bf7ab3ad8..4a2db350b408124c846d503ad914a5adfc949791 100644 (file)
         "10"
       ]
     },
+    {
+      "operatingsystem": "SLES",
+      "operatingsystemrelease": [
+        "15"
+      ]
+    },
     {
       "operatingsystem": "Archlinux"
     },
index 4ae75eb3e2fe07ef2b8456002ac3d656ef4457b3..e8afa73f72940b55d8f3a62f105c6c1f902c4084 100644 (file)
@@ -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