Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions manifests/osfamily/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
'2-aarch64' => '2',
'2-x86_64' => '7',
/^(2017|2018)-/ => '6',
'2023-x86_64' => '8',
'2023-aarch64' => '8',
default => $major_version,
}

$platform_and_version = "${amz_el_version}" ? {
/^(6|7)$/ => "el/${amz_el_version}",
/^(6|7|8)$/ => "el/${amz_el_version}",
default => "amazon/${amz_el_version}",
}
}
Expand All @@ -43,7 +45,7 @@
if $facts['os']['name'] == 'Amazon' {
# lint:ignore:only_variable_string
$pe_repo_dir = "${amz_el_version}" ? {
/^(6|7)$/ => "el-${amz_el_version}-${facts['os']['architecture']}",
/^(6|7|8)$/ => "el-${amz_el_version}-${facts['os']['architecture']}",
default => $facts['platform_tag'],
}
# lint:endignore
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/puppet_agent_osfamily_redhat_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
['Amazon', 'el/6', '2018', 'x86_64'],
['Amazon', 'el/7', '2', 'x86_64'],
['Amazon', 'amazon/2', '2', 'aarch64'],
['Amazon', 'amazon/2023', '2023', 'x86_64'],
['Amazon', 'amazon/2023', '2023', 'aarch64'],
['Amazon', 'el/8', '2023', 'x86_64'],
['Amazon', 'el/8', '2023', 'aarch64'],
].each do |os, urlbit, osmajor, arch|
context "with #{os} and #{urlbit}" do
let(:facts) do
Expand Down
Loading