Skip to content

Commit

Permalink
Add OracleLinux support
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMeier committed Jun 5, 2024
1 parent 61c272e commit 4dd7dec
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
$_os = $facts['os']['name'] ? {
'centos' => 'centos',
'VirtuozzoLinux' => 'centos',
'OracleLinux' => 'centos',
default => 'rhel'
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}
}
'RedHat': {
if $facts['os']['name'] in ['RedHat', 'CentOS', 'Oracle', 'virtuozzolinux', 'Rocky', 'AlmaLinux'] {
if $facts['os']['name'] in ['RedHat', 'CentOS', 'OracleLinux', 'virtuozzolinux', 'Rocky', 'AlmaLinux'] {
$_module_os_overrides = {
'manage_repo' => true,
'log_group' => 'nginx',
Expand Down
7 changes: 7 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
"9"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"8",
"9"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

it do
is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "https://nginx.org/packages/#{%w[CentOS VirtuozzoLinux].include?(facts[:operatingsystem]) ? 'centos' : 'rhel'}/#{facts[:operatingsystemmajrelease]}/$basearch/",
'baseurl' => "https://nginx.org/packages/#{%w[CentOS VirtuozzoLinux OracleLinux].include?(facts[:operatingsystem]) ? 'centos' : 'rhel'}/#{facts[:operatingsystemmajrelease]}/$basearch/",
'descr' => 'nginx repo',
'enabled' => '1',
'gpgcheck' => '1',
Expand All @@ -74,7 +74,7 @@

it do
is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "https://nginx.org/packages/#{%w[CentOS VirtuozzoLinux].include?(facts[:operatingsystem]) ? 'centos' : 'rhel'}/#{facts[:operatingsystemmajrelease]}/$basearch/",
'baseurl' => "https://nginx.org/packages/#{%w[CentOS VirtuozzoLinux OracleLinux].include?(facts[:operatingsystem]) ? 'centos' : 'rhel'}/#{facts[:operatingsystemmajrelease]}/$basearch/",
'descr' => 'nginx repo',
'enabled' => '1',
'gpgcheck' => '1',
Expand All @@ -91,7 +91,7 @@

it do
is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "https://nginx.org/packages/mainline/#{%w[CentOS VirtuozzoLinux].include?(facts[:operatingsystem]) ? 'centos' : 'rhel'}/#{facts[:operatingsystemmajrelease]}/$basearch/"
'baseurl' => "https://nginx.org/packages/mainline/#{%w[CentOS VirtuozzoLinux OracleLinux].include?(facts[:operatingsystem]) ? 'centos' : 'rhel'}/#{facts[:operatingsystemmajrelease]}/$basearch/"
)
end

Expand Down

0 comments on commit 4dd7dec

Please sign in to comment.