Skip to content
Draft
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
21 changes: 13 additions & 8 deletions tasks/install_puppetserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,17 @@ fetch_osfamily() {
}

fetch_collection() {
myarr=()
for x in $(echo "$1" | tr "-" "\n")
do
myarr+=("$x")
done
echo "${myarr[0]}"
# Handle puppetcore8-nightly -> puppet8-nightly conversion
if [[ "$1" == puppetcore8* ]]; then
echo "${1/puppetcore8/puppet8}"
else
myarr=()
for x in $(echo "$1" | tr "-" "\n")
do
myarr+=("$x")
done
echo "${myarr[0]}"
fi
}

fetch_codename() {
Expand Down Expand Up @@ -157,15 +162,15 @@ if [[ "$osfamily" == "debian" ]]; then
echo "No builds for $platform"
exit 1
else
run_cmd "curl -o puppet.deb http://apt.puppetlabs.com/${collection}-release-${codename}.deb"
run_cmd "curl -o puppet.deb https://artifactory.delivery.puppetlabs.net:443/artifactory/internal_nightly__local/apt/${collection}-release-${codename}.deb"
dpkg -i --force-confmiss puppet.deb
apt-get update -y
apt-get install puppetserver -y
fi
fi

if [[ "$osfamily" == "redhat" ]]; then
run_cmd "curl -o puppet.rpm http://yum.puppetlabs.com/${collection}-release-el-${major_version}.noarch.rpm"
run_cmd "curl -o puppet.rpm https://artifactory.delivery.puppetlabs.net:443/artifactory/internal_nightly__local/yum/${collection}-release-el-${major_version}.noarch.rpm"
rpm -Uvh puppet.rpm --quiet
yum install puppetserver -y --quiet
fi
Expand Down
Loading