From f94e042df557c5932f6e911d473da42c00b27ed9 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 10 Jul 2022 00:57:50 +0900 Subject: [PATCH] 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] f384effdb42e0cbe19e137f0411b09ac8fef5b48 Change-Id: I0b9529b6a4f1c4beefa72b6e32b586b1ac9bea73 --- functions | 19 ++++--------------- run_tests.sh | 10 ++-------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/functions b/functions index 09bd92767..fa5548f79 100644 --- a/functions +++ b/functions @@ -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-master/deps/latest/ -enabled=1 -gpgcheck=0 -EOF" - fi fi $SUDO $YUM install -y ${PUPPET_PKG} fi diff --git a/run_tests.sh b/run_tests.sh index d379cedd8..4f1c1aae8 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -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)'