Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions tasks/install_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,13 @@ install_file() {

repo="/etc/yum.repos.d/${collection/core/}-release.repo"
rpm -Uvh --oldpackage --replacepkgs "$2"
if [[ -n $username ]]; then
if [[ "$collection" =~ core ]]; then
if [[ -n $username ]]; then
sed -i "s/^#\?username=.*/username=${username}/" "${repo}"
fi
if [[ -n $password ]]; then
fi
if [[ -n $password ]]; then
sed -i "s/^#\?password=.*/password=${password}/" "${repo}"
fi
fi
exists dnf && PKGCMD=dnf || PKGCMD=yum
if test "$version" = 'latest'; then
Expand All @@ -632,11 +634,13 @@ install_file() {
fi

run_cmd "zypper install --no-confirm '$2'"
if [[ -n $username ]]; then
if [[ "$collection" =~ core ]]; then
if [[ -n $username ]]; then
sed -i "s/^username=.*/username=${username}/" "/etc/zypp/credentials.d/PuppetcoreCreds"
fi
if [[ -n $password ]]; then
fi
if [[ -n $password ]]; then
sed -i "s/^password=.*/password=${password}/" "/etc/zypp/credentials.d/PuppetcoreCreds"
fi
fi
if test "$version" = "latest"; then
run_cmd "zypper install --no-confirm 'puppet-agent'"
Expand Down Expand Up @@ -700,7 +704,7 @@ case $platform in
info "SLES platform! Lets get you an RPM..."

if [[ $PT__noop != true ]]; then
if [[ "$PT_collection" =~ core ]]; then
if [[ "$collection" =~ core ]]; then
for key in "puppet"; do
gpg_key="${tmp_dir}/RPM-GPG-KEY-${key}"
do_download "https://yum-puppetcore.puppet.com/public/RPM-GPG-KEY-${key}" "$gpg_key"
Expand All @@ -710,7 +714,7 @@ case $platform in
else
for key in "puppet" "puppet-20250406"; do
gpg_key="${tmp_dir}/RPM-GPG-KEY-${key}"
do_download "https://yum.puppet.com/public/RPM-GPG-KEY-${key}" "$gpg_key"
do_download "https://yum.puppet.com/RPM-GPG-KEY-${key}" "$gpg_key"
rpm --import "$gpg_key"
rm -f "$gpg_key"
done
Expand Down
Loading