Skip to content

Commit c7968cf

Browse files
authored
Merge pull request #25 from puppetlabs/amazon-2-aarch64
(PE-38404) Update script for AL2 (again)
2 parents 95f53aa + 9d3dd9f commit c7968cf

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

install.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,6 @@ case $platform in
519519
"SLES")
520520
platform_version=$major_version
521521
;;
522-
"Amzn"|"Amazon Linux")
523-
case $platform_version in
524-
"2") platform_version="2";;
525-
esac
526-
;;
527522
esac
528523

529524
# Find which version of puppet is currently installed if any
@@ -897,8 +892,11 @@ case $platform in
897892
info "Amazon platform! Lets get you an RPM..."
898893
filetype="rpm"
899894
platform_package="el"
900-
# For Amazon Linux 2023 and onwards we can use the 'amazon' packages created instead of 'el' packages
901-
if (( $platform_version >= 2 )); then
895+
arch="$(uname -p)"
896+
# Install amazon packages on AL2 (only aarch64) and 2023 and up (all arch)
897+
if [[ $platform_version == 2 && $arch == 'x86_64' ]]; then
898+
platform_version="7"
899+
elif (( platform_version == 2 || platform_version >= 2023 )); then
902900
platform_package="amazon"
903901
fi
904902
filename="${collection}-release-${platform_package}-${platform_version}.noarch.rpm"

0 commit comments

Comments
 (0)