Skip to content

Commit 7bf9e0b

Browse files
(PA-5581) Add Amazon Linux 2023 (Intel and ARM) to the puppet_agent module task acceptance
- Target nightly collections for Amazon Linux 2023 since only nightly builds are available for it for now. - Install puppet script installs 'el' package for amazon. From Amazon Linux 2023 onwards we have 'amazon' named packages available, so the condition added should install the 'amazon' package for versions 2023 and above.
1 parent 18a8090 commit 7bf9e0b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

task_spec/spec/acceptance/init_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def log_output_errors(result)
5656
'7.18.0'
5757
when %r{osx-13}
5858
'7.26.0'
59-
when %r{el-9-aarch64}, %r{ubuntu-22.04-aarch64}
59+
when %r{el-9-aarch64}, %r{ubuntu-22.04-aarch64}, %r{amazon-2023-x86_64}, %r{amazon-2023-aarch64}
6060
'latest'
6161
else
6262
'7.18.0'
@@ -71,7 +71,7 @@ def log_output_errors(result)
7171
# else
7272
# end
7373
case target_platform
74-
when %r{el-9-aarch64}, %r{ubuntu-22.04-aarch64}
74+
when %r{el-9-aarch64}, %r{ubuntu-22.04-aarch64}, %r{amazon-2023-x86_64}, %r{amazon-2023-aarch64}
7575
puppet_7_collection = 'puppet7-nightly'
7676
puppet_8_collection = 'puppet8-nightly'
7777
else

tasks/install_shell.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,12 @@ case $platform in
601601
"Amzn"|"Amazon Linux")
602602
info "Amazon platform! Lets get you an RPM..."
603603
filetype="rpm"
604-
filename="${collection}-release-el-${platform_version}.noarch.rpm"
604+
platform_package="el"
605+
# For Amazon Linux 2023 and onwards we can use the 'amazon' packages created instead of 'el' packages
606+
if (( $platform_version >= 2023 )); then
607+
platform_package="amazon"
608+
fi
609+
filename="${collection}-release-${platform_package}-${platform_version}.noarch.rpm"
605610
download_url="${yum_source}/${filename}"
606611
;;
607612
"Fedora")

0 commit comments

Comments
 (0)