Skip to content

Commit

Permalink
Add support for OracleLinux/AlmaLinux/Rocky 9
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Nov 15, 2023
1 parent b9e2781 commit b234dda
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
18 changes: 18 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@
"9"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"9"
]
},
{
"operatingsystem": "AlmaLinux",
"operatingsystemrelease": [
"9"
]
},
{
"operatingsystem": "Rocky",
"operatingsystemrelease": [
"9"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
Expand Down
12 changes: 6 additions & 6 deletions spec/classes/puppet_agent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) }
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) }
Expand Down Expand Up @@ -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) }
Expand Down Expand Up @@ -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') }
Expand Down

0 comments on commit b234dda

Please sign in to comment.