@@ -100,6 +100,16 @@ if [ -n "$PT_version" ]; then
100100 version=$PT_version
101101fi
102102
103+ if [ -n " $PT_username " ]; then
104+ username=$PT_username
105+ else
106+ username=" forge-key"
107+ fi
108+
109+ if [ -n " $PT_password " ]; then
110+ password=$PT_password
111+ fi
112+
103113if [ -n " $PT_collection " ]; then
104114 # Check whether collection is nightly
105115 if [[ " $PT_collection " == * " nightly" * ]]; then
@@ -110,7 +120,7 @@ if [ -n "$PT_collection" ]; then
110120
111121 collection=$PT_collection
112122else
113- collection=' puppet '
123+ collection=' puppet8 '
114124fi
115125
116126if [ -n " $PT_yum_source " ]; then
@@ -119,7 +129,11 @@ else
119129 if [ " $nightly " = true ]; then
120130 yum_source=' https://artifactory.delivery.puppetlabs.net:443/artifactory/internal_nightly__local/yum'
121131 else
122- yum_source=' http://yum.puppet.com'
132+ yum_source=' https://yum-puppetcore.puppet.com/public'
133+ if [ -z " $password " ]; then
134+ echo " A password parameter is required to install from ${yum_source} "
135+ exit 1
136+ fi
123137 fi
124138fi
125139
@@ -583,6 +597,8 @@ install_file() {
583597 fi
584598
585599 rpm -Uvh --oldpackage --replacepkgs " $2 "
600+ sed -i " s/^#\?username=.*/username=${username} /" " /etc/yum.repos.d/puppet8-release.repo"
601+ sed -i " s/^#\?password=.*/password=${password} /" " /etc/yum.repos.d/puppet8-release.repo"
586602 exists dnf && PKGCMD=dnf || PKGCMD=yum
587603 if test " $version " = ' latest' ; then
588604 run_cmd " ${PKGCMD} install -y puppet-agent && ${PKGCMD} upgrade -y puppet-agent"
@@ -606,7 +622,7 @@ install_file() {
606622 fi
607623 fi
608624
609- run_cmd " zypper install --no-confirm ' $2 ' "
625+ sed -i ' s/^baseurl/baseurl=https:\/\/${username}:${password}@yum-puppetcore.puppet.com\/puppet8\/sles\/\$basearch?auth=basic ' " /etc/zypp/repos.d/puppet8-release.repo "
610626 if test " $version " = " latest" ; then
611627 run_cmd " zypper install --no-confirm 'puppet-agent'"
612628 else
@@ -669,9 +685,9 @@ case $platform in
669685 info " SLES platform! Lets get you an RPM..."
670686
671687 if [[ $PT__noop != true ]]; then
672- for key in " puppet" " puppet -20250406" ; do
688+ for key in " puppet-20250406" ; do
673689 gpg_key=" ${tmp_dir} /RPM-GPG-KEY-${key} "
674- do_download " https://yum.puppet.com/RPM-GPG-KEY-${key} " " $gpg_key "
690+ do_download " https://yum-puppetcore .puppet.com/public /RPM-GPG-KEY-${key} " " $gpg_key "
675691 rpm --import " $gpg_key "
676692 rm -f " $gpg_key "
677693 done
0 commit comments