diff --git a/manifests/package/redhat.pp b/manifests/package/redhat.pp index f65d706d4..6ae1d7c0c 100644 --- a/manifests/package/redhat.pp +++ b/manifests/package/redhat.pp @@ -16,6 +16,7 @@ $_os = $facts['os']['name'] ? { 'centos' => 'centos', 'VirtuozzoLinux' => 'centos', + 'OracleLinux' => 'centos', default => 'rhel' } diff --git a/manifests/params.pp b/manifests/params.pp index 761b81cd1..57cfce057 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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', diff --git a/metadata.json b/metadata.json index 8c5633f5e..539d89b0d 100644 --- a/metadata.json +++ b/metadata.json @@ -55,6 +55,13 @@ "9" ] }, + { + "operatingsystem": "OracleLinux", + "operatingsystemrelease": [ + "8", + "9" + ] + }, { "operatingsystem": "CentOS", "operatingsystemrelease": [ diff --git a/spec/classes/nginx_spec.rb b/spec/classes/nginx_spec.rb index 91fe846a1..916f074d4 100644 --- a/spec/classes/nginx_spec.rb +++ b/spec/classes/nginx_spec.rb @@ -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', @@ -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', @@ -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