@@ -602,11 +602,13 @@ install_file() {
602
602
603
603
repo=" /etc/yum.repos.d/${collection/ core/ } -release.repo"
604
604
rpm -Uvh --oldpackage --replacepkgs " $2 "
605
- if [[ -n $username ]]; then
605
+ if [[ " $collection " =~ core ]]; then
606
+ if [[ -n $username ]]; then
606
607
sed -i " s/^#\?username=.*/username=${username} /" " ${repo} "
607
- fi
608
- if [[ -n $password ]]; then
608
+ fi
609
+ if [[ -n $password ]]; then
609
610
sed -i " s/^#\?password=.*/password=${password} /" " ${repo} "
611
+ fi
610
612
fi
611
613
exists dnf && PKGCMD=dnf || PKGCMD=yum
612
614
if test " $version " = ' latest' ; then
@@ -632,11 +634,13 @@ install_file() {
632
634
fi
633
635
634
636
run_cmd " zypper install --no-confirm '$2 '"
635
- if [[ -n $username ]]; then
637
+ if [[ " $collection " =~ core ]]; then
638
+ if [[ -n $username ]]; then
636
639
sed -i " s/^username=.*/username=${username} /" " /etc/zypp/credentials.d/PuppetcoreCreds"
637
- fi
638
- if [[ -n $password ]]; then
640
+ fi
641
+ if [[ -n $password ]]; then
639
642
sed -i " s/^password=.*/password=${password} /" " /etc/zypp/credentials.d/PuppetcoreCreds"
643
+ fi
640
644
fi
641
645
if test " $version " = " latest" ; then
642
646
run_cmd " zypper install --no-confirm 'puppet-agent'"
@@ -700,7 +704,7 @@ case $platform in
700
704
info " SLES platform! Lets get you an RPM..."
701
705
702
706
if [[ $PT__noop != true ]]; then
703
- if [[ " $PT_collection " =~ core ]]; then
707
+ if [[ " $collection " =~ core ]]; then
704
708
for key in " puppet" ; do
705
709
gpg_key=" ${tmp_dir} /RPM-GPG-KEY-${key} "
706
710
do_download " https://yum-puppetcore.puppet.com/public/RPM-GPG-KEY-${key} " " $gpg_key "
@@ -710,7 +714,7 @@ case $platform in
710
714
else
711
715
for key in " puppet" " puppet-20250406" ; do
712
716
gpg_key=" ${tmp_dir} /RPM-GPG-KEY-${key} "
713
- do_download " https://yum.puppet.com/public/ RPM-GPG-KEY-${key} " " $gpg_key "
717
+ do_download " https://yum.puppet.com/RPM-GPG-KEY-${key} " " $gpg_key "
714
718
rpm --import " $gpg_key "
715
719
rm -f " $gpg_key "
716
720
done
0 commit comments