From b234ddae84e23a2b244e18ffb6b06caded86508a Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 3 Nov 2023 09:09:59 +0100 Subject: [PATCH] Add support for OracleLinux/AlmaLinux/Rocky 9 --- metadata.json | 18 ++++++++++++++++++ spec/classes/puppet_agent_spec.rb | 12 ++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/metadata.json b/metadata.json index 4e089c07..6c68f5fc 100644 --- a/metadata.json +++ b/metadata.json @@ -55,6 +55,24 @@ "9" ] }, + { + "operatingsystem": "OracleLinux", + "operatingsystemrelease": [ + "9" + ] + }, + { + "operatingsystem": "AlmaLinux", + "operatingsystemrelease": [ + "9" + ] + }, + { + "operatingsystem": "Rocky", + "operatingsystemrelease": [ + "9" + ] + }, { "operatingsystem": "Scientific", "operatingsystemrelease": [ diff --git a/spec/classes/puppet_agent_spec.rb b/spec/classes/puppet_agent_spec.rb index 38b4bc20..46bc1535 100644 --- a/spec/classes/puppet_agent_spec.rb +++ b/spec/classes/puppet_agent_spec.rb @@ -94,7 +94,7 @@ it { is_expected.to contain_class('puppet::agent::service::systemd').with_enabled(false) } case os - when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|archlinux)-/ + when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|archlinux|oraclelinux|almalinux|rocky)-/ it do is_expected.to contain_service('puppet-run.timer') .with_ensure(false) @@ -171,7 +171,7 @@ case os when /\A(windows|archlinux)/ it { is_expected.to raise_error(Puppet::Error, /Runmode of cron not supported on #{facts[:kernel]} operating systems!/) } - when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles)-/ + when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|oraclelinux|almalinux|rocky)-/ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_concat__fragment('puppet.conf_agent') } it { is_expected.to contain_class('puppet::agent::service::cron').with_enabled(true) } @@ -219,7 +219,7 @@ case os when /\A(windows|archlinux)/ it { is_expected.to raise_error(Puppet::Error, /Runmode of cron not supported on #{facts[:kernel]} operating systems!/) } - when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles)-/ + when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|oraclelinux|almalinux|rocky)-/ it { is_expected.to contain_class('puppet::agent::service::cron').with_enabled(true) } it { is_expected.to contain_class('puppet::agent::service::daemon').with_enabled(false) } it do @@ -260,7 +260,7 @@ end case os - when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|archlinux)-/ + when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|archlinux|oraclelinux|almalinux|rocky)-/ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('puppet::agent::service::daemon').with_enabled(false) } it { is_expected.to contain_class('puppet::agent::service::cron').with_enabled(false) } @@ -303,7 +303,7 @@ end case os - when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|archlinux)-/ + when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|archlinux|oraclelinux|almalinux|rocky)-/ it { is_expected.to compile.with_all_deps } it { is_expected.to contain_class('puppet::agent::service::daemon').with_enabled(false) } it { is_expected.to contain_class('puppet::agent::service::cron').with_enabled(false) } @@ -351,7 +351,7 @@ it { is_expected.to contain_class('puppet::agent::service::systemd').with_enabled(false) } case os - when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|archlinux)-/ + when /\A(debian|redhat|centos|scientific|fedora|ubuntu|sles|archlinux|oraclelinux|almalinux|rocky)-/ it { is_expected.to contain_service('puppet-run.timer').with_ensure(false) } else it { is_expected.not_to contain_service('puppet-run.timer') }