CentOS 9: Switch back to puppetlabs packages

CnetOS 9 packages were already released in the puppetlabs repo.

This removes the workaround to use RDO packages, which was earlier
added to run integration jobs on CentOS Stream 9 before the packages
were released[1].

[1] f384effdb4

Conflicts:
	functions

Change-Id: I0b9529b6a4f1c4beefa72b6e32b586b1ac9bea73
(cherry picked from commit f94e042df5)
This commit is contained in:
Takashi Kajinami 2022-07-10 00:57:50 +09:00
parent edacdfed77
commit 9a9a9b3bbc
2 changed files with 6 additions and 23 deletions

View File

@ -219,11 +219,10 @@ install_puppet() {
fi
source /etc/os-release
if [ "${MANAGE_REPOS}" == "true" ] ; then
if [ ${VERSION_ID} -ne 9 ] ; then
$SUDO rpm --import ${NODEPOOL_PUPPETLABS_MIRROR}/RPM-GPG-KEY-puppetlabs
$SUDO rpm --import ${NODEPOOL_PUPPETLABS_MIRROR}/RPM-GPG-KEY-puppet
$SUDO rpm --import ${NODEPOOL_PUPPETLABS_MIRROR}/RPM-GPG-KEY-puppet-20250406
$SUDO bash -c "cat << EOF > /etc/yum.repos.d/puppetlabs.repo
$SUDO rpm --import ${NODEPOOL_PUPPETLABS_MIRROR}/RPM-GPG-KEY-puppetlabs
$SUDO rpm --import ${NODEPOOL_PUPPETLABS_MIRROR}/RPM-GPG-KEY-puppet
$SUDO rpm --import ${NODEPOOL_PUPPETLABS_MIRROR}/RPM-GPG-KEY-puppet-20250406
$SUDO bash -c "cat << EOF > /etc/yum.repos.d/puppetlabs.repo
[puppetlabs-products]
name=Puppet Labs Products El ${VERSION_ID} - x86_64
baseurl=${NODEPOOL_PUPPETLABS_MIRROR}/puppet${PUPPET_MAJ_VERSION}/el/${VERSION_ID}/x86_64/
@ -233,16 +232,6 @@ gpgkey=${NODEPOOL_PUPPETLABS_MIRROR}/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=1
EOF"
else
# TODO we are using puppet from RDO in CS9 until there el9 in puppetlabs repo
$SUDO bash -c "cat << EOF > /etc/yum.repos.d/puppet-rdo.repo
[puppet-rdo]
name=Puppet from RDO repo for CentOS ${VERSION_ID} - x86_64
baseurl=https://trunk.rdoproject.org/centos9-yoga/deps/latest/
enabled=1
gpgcheck=0
EOF"
fi
fi
$SUDO $YUM install -y ${PUPPET_PKG}
fi

View File

@ -48,14 +48,8 @@ export WRITE_FACTS=false
source ${SCRIPT_DIR}/configure_facts.sh
export PATH=${PATH}:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin
# TODO In CentOS9 there is no puppetlabs package yet, so we use RDO one.
if [ "${OS_NAME_VERS}" == "centos9" ]; then
export PUPPET_BASE_PATH=/etc/puppet
export PUPPET_PKG="puppet"
else
export PUPPET_BASE_PATH=/etc/puppetlabs/code
export PUPPET_PKG=${PUPPET_PKG:-puppet-agent}
fi
export PUPPET_BASE_PATH=/etc/puppetlabs/code
export PUPPET_PKG=${PUPPET_PKG:-puppet-agent}
print_header 'Start (run_tests.sh)'