@@ -5652,23 +5652,44 @@ install_amazon_linux_ami_2_deps() {
56525652
56535653 if [ $_DISABLE_REPOS -eq $BS_FALSE ] || [ " $_CUSTOM_REPO_URL " != " null" ]; then
56545654 if [ ! -s " ${YUM_REPO_FILE} " ]; then
5655- FETCH_URL=" https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo"
5656- __fetch_url " ${YUM_REPO_FILE} " " ${FETCH_URL} "
5655+ # # Amazon Linux yum (v3) doesn't support config-manager
5656+ # # FETCH_URL="https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo"
5657+ # # __fetch_url "${YUM_REPO_FILE}" "${FETCH_URL}"
5658+ # shellcheck disable=SC2129
56575659 if [ " $STABLE_REV " != " latest" ]; then
56585660 # 3006.x is default, and latest for 3006.x branch
56595661 if [ " $( echo " $STABLE_REV " | grep -E ' ^(3006|3007)$' ) " != " " ]; then
56605662 # latest version for branch 3006 | 3007
56615663 REPO_REV_MAJOR=$( echo " $STABLE_REV " | cut -d ' .' -f 1)
56625664 if [ " $REPO_REV_MAJOR " -eq " 3007" ]; then
56635665 # Enable the Salt 3007 STS repo
5664- yum config-manager --set-disable salt-repo-*
5665- yum config-manager --set-enabled salt-repo-3007-sts
5666+ echo " [salt-repo-3007-sts]" > " ${YUM_REPO_FILE} "
5667+ echo " name=Salt Repo for Salt v3007 STS" >> " ${YUM_REPO_FILE} "
5668+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5669+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5670+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5671+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5672+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5673+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5674+ echo " exclude=*3006* *3008* *3009* *3010*" >> " ${YUM_REPO_FILE} "
5675+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
5676+ else
5677+ # Salt 3006 repo
5678+ echo " [salt-repo-3006-lts]" > " ${YUM_REPO_FILE} "
5679+ echo " name=Salt Repo for Salt v3006 LTS" >> " ${YUM_REPO_FILE} "
5680+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5681+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5682+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5683+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5684+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5685+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5686+ echo " exclude=*3007* *3008* *3009* *3010*" >> " ${YUM_REPO_FILE} "
5687+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
56665688 fi
56675689 elif [ " $( echo " $STABLE_REV " | grep -E ' ^([3-9][0-5]{2}[6-9](\.[0-9]*)?)' ) " != " " ]; then
56685690 # using minor version
56695691 STABLE_REV_DOT=$( echo " $STABLE_REV " | sed ' s/-/\./' )
56705692 echo " [salt-repo-${STABLE_REV_DOT} -lts]" > " ${YUM_REPO_FILE} "
5671- # shellcheck disable=SC2129
56725693 echo " name=Salt Repo for Salt v${STABLE_REV_DOT} LTS" >> " ${YUM_REPO_FILE} "
56735694 echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
56745695 echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
@@ -5680,8 +5701,15 @@ install_amazon_linux_ami_2_deps() {
56805701 fi
56815702 else
56825703 # Enable the Salt LATEST repo
5683- yum config-manager --set-disable salt-repo-*
5684- yum config-manager --set-enabled salt-repo-latest
5704+ echo " [salt-repo-latest]" > " ${YUM_REPO_FILE} "
5705+ echo " name=Salt Repo for Salt LATEST release" >> " ${YUM_REPO_FILE} "
5706+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5707+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5708+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5709+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5710+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5711+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5712+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
56855713 fi
56865714 yum clean expire-cache || return 1
56875715 yum makecache || return 1
@@ -5717,23 +5745,44 @@ install_amazon_linux_ami_2_onedir_deps() {
57175745
57185746 if [ $_DISABLE_REPOS -eq $BS_FALSE ] || [ " $_CUSTOM_REPO_URL " != " null" ]; then
57195747 if [ ! -s " ${YUM_REPO_FILE} " ]; then
5720- FETCH_URL=" https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo"
5721- __fetch_url " ${YUM_REPO_FILE} " " ${FETCH_URL} "
5748+ # # Amazon Linux yum (v3) doesn't support config-manager
5749+ # # FETCH_URL="https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo"
5750+ # # __fetch_url "${YUM_REPO_FILE}" "${FETCH_URL}"
5751+ # shellcheck disable=SC2129
57225752 if [ " $ONEDIR_REV " != " latest" ]; then
57235753 # 3006.x is default, and latest for 3006.x branch
57245754 if [ " $( echo " $ONEDIR_REV " | grep -E ' ^(3006|3007)$' ) " != " " ]; then
57255755 # latest version for branch 3006 | 3007
57265756 REPO_REV_MAJOR=$( echo " $ONEDIR_REV " | cut -d ' .' -f 1)
57275757 if [ " $REPO_REV_MAJOR " -eq " 3007" ]; then
57285758 # Enable the Salt 3007 STS repo
5729- yum config-manager --set-disable salt-repo-*
5730- yum config-manager --set-enabled salt-repo-3007-sts
5759+ echo " [salt-repo-3007-sts]" > " ${YUM_REPO_FILE} "
5760+ echo " name=Salt Repo for Salt v3007 STS" >> " ${YUM_REPO_FILE} "
5761+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5762+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5763+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5764+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5765+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5766+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5767+ echo " exclude=*3006* *3008* *3009* *3010*" >> " ${YUM_REPO_FILE} "
5768+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
5769+ else
5770+ # Salt 3006 repo
5771+ echo " [salt-repo-3006-lts]" > " ${YUM_REPO_FILE} "
5772+ echo " name=Salt Repo for Salt v3006 LTS" >> " ${YUM_REPO_FILE} "
5773+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5774+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5775+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5776+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5777+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5778+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5779+ echo " exclude=*3007* *3008* *3009* *3010*" >> " ${YUM_REPO_FILE} "
5780+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
57315781 fi
57325782 elif [ " $( echo " $ONEDIR_REV " | grep -E ' ^([3-9][0-5]{2}[6-9](\.[0-9]*)?)' ) " != " " ]; then
57335783 # using minor version
57345784 ONEDIR_REV_DOT=$( echo " $ONEDIR_REV " | sed ' s/-/\./' )
57355785 echo " [salt-repo-${ONEDIR_REV_DOT} -lts]" > " ${YUM_REPO_FILE} "
5736- # shellcheck disable=SC2129
57375786 echo " name=Salt Repo for Salt v${ONEDIR_REV_DOT} LTS" >> " ${YUM_REPO_FILE} "
57385787 echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
57395788 echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
@@ -5745,8 +5794,15 @@ install_amazon_linux_ami_2_onedir_deps() {
57455794 fi
57465795 else
57475796 # Enable the Salt LATEST repo
5748- yum config-manager --set-disable salt-repo-*
5749- yum config-manager --set-enabled salt-repo-latest
5797+ echo " [salt-repo-latest]" > " ${YUM_REPO_FILE} "
5798+ echo " name=Salt Repo for Salt LATEST release" >> " ${YUM_REPO_FILE} "
5799+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5800+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5801+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5802+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5803+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5804+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5805+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
57505806 fi
57515807 yum clean expire-cache || return 1
57525808 yum makecache || return 1
@@ -5852,6 +5908,13 @@ install_amazon_linux_ami_2023_git_deps() {
58525908 return 0
58535909}
58545910
5911+ install_amazon_linux_ami_2023_deps () {
5912+
5913+ # Set ONEDIR_REV to STABLE_REV
5914+ ONEDIR_REV=${STABLE_REV}
5915+ install_amazon_linux_ami_2023_onedir_deps || return 1
5916+ }
5917+
58555918install_amazon_linux_ami_2023_onedir_deps () {
58565919
58575920 # We need to install yum-utils before doing anything else when installing on
@@ -5870,23 +5933,44 @@ install_amazon_linux_ami_2023_onedir_deps() {
58705933
58715934 if [ $_DISABLE_REPOS -eq $BS_FALSE ] || [ " $_CUSTOM_REPO_URL " != " null" ]; then
58725935 if [ ! -s " ${YUM_REPO_FILE} " ]; then
5873- FETCH_URL=" https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo"
5874- __fetch_url " ${YUM_REPO_FILE} " " ${FETCH_URL} "
5936+ # # Amazon Linux yum (v3) doesn't support config-manager
5937+ # # FETCH_URL="https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo"
5938+ # # __fetch_url "${YUM_REPO_FILE}" "${FETCH_URL}"
5939+ # shellcheck disable=SC2129
58755940 if [ " $ONEDIR_REV " != " latest" ]; then
58765941 # 3006.x is default, and latest for 3006.x branch
58775942 if [ " $( echo " $ONEDIR_REV " | grep -E ' ^(3006|3007)$' ) " != " " ]; then
58785943 # latest version for branch 3006 | 3007
58795944 REPO_REV_MAJOR=$( echo " $ONEDIR_REV " | cut -d ' .' -f 1)
58805945 if [ " $REPO_REV_MAJOR " -eq " 3007" ]; then
58815946 # Enable the Salt 3007 STS repo
5882- yum config-manager --set-disable salt-repo-*
5883- yum config-manager --set-enabled salt-repo-3007-sts
5947+ echo " [salt-repo-3007-sts]" > " ${YUM_REPO_FILE} "
5948+ echo " name=Salt Repo for Salt v3007 STS" >> " ${YUM_REPO_FILE} "
5949+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5950+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5951+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5952+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5953+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5954+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5955+ echo " exclude=*3006* *3008* *3009* *3010*" >> " ${YUM_REPO_FILE} "
5956+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
5957+ else
5958+ # Salt 3006 repo
5959+ echo " [salt-repo-3006-lts]" > " ${YUM_REPO_FILE} "
5960+ echo " name=Salt Repo for Salt v3006 LTS" >> " ${YUM_REPO_FILE} "
5961+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5962+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5963+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5964+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5965+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5966+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5967+ echo " exclude=*3007* *3008* *3009* *3010*" >> " ${YUM_REPO_FILE} "
5968+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
58845969 fi
58855970 elif [ " $( echo " $ONEDIR_REV " | grep -E ' ^([3-9][0-5]{2}[6-9](\.[0-9]*)?)' ) " != " " ]; then
58865971 # using minor version
58875972 ONEDIR_REV_DOT=$( echo " $ONEDIR_REV " | sed ' s/-/\./' )
58885973 echo " [salt-repo-${ONEDIR_REV_DOT} -lts]" > " ${YUM_REPO_FILE} "
5889- # shellcheck disable=SC2129
58905974 echo " name=Salt Repo for Salt v${ONEDIR_REV_DOT} LTS" >> " ${YUM_REPO_FILE} "
58915975 echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
58925976 echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
@@ -5898,8 +5982,15 @@ install_amazon_linux_ami_2023_onedir_deps() {
58985982 fi
58995983 else
59005984 # Enable the Salt LATEST repo
5901- yum config-manager --set-disable salt-repo-*
5902- yum config-manager --set-enabled salt-repo-latest
5985+ echo " [salt-repo-latest]" > " ${YUM_REPO_FILE} "
5986+ echo " name=Salt Repo for Salt LATEST release" >> " ${YUM_REPO_FILE} "
5987+ echo " baseurl=https://${_REPO_URL} /saltproject-rpm/" >> " ${YUM_REPO_FILE} "
5988+ echo " skip_if_unavailable=True" >> " ${YUM_REPO_FILE} "
5989+ echo " priority=10" >> " ${YUM_REPO_FILE} "
5990+ echo " enabled=1" >> " ${YUM_REPO_FILE} "
5991+ echo " enabled_metadata=1" >> " ${YUM_REPO_FILE} "
5992+ echo " gpgcheck=1" >> " ${YUM_REPO_FILE} "
5993+ echo " gpgkey=https://${_REPO_URL} /api/security/keypair/SaltProjectKey/public" >> " ${YUM_REPO_FILE} "
59035994 fi
59045995 yum clean expire-cache || return 1
59055996 yum makecache || return 1
0 commit comments