Fix installing puppet in Debian.

This patch fixes the install of the puppet packages in Debian.

Change-Id: I5674333169c8d961dbe29fc2f93bf42635cc2748
changes/43/785143/2
Thomas Goirand 2 years ago
parent f6b75a4f40
commit 6ce74b546e

@ -48,9 +48,13 @@ if is_fedora; then
DASHBOARD="dashboard"
elif uses_debs; then
print_header 'Setup (Debian based)'
sudo apt-get remove -y --purge facter puppet puppet-common
sudo apt-get update
sudo apt-get install -y libxml2-dev libxslt-dev zlib1g-dev ruby wget lsb-release curl apt-transport-https adduser
# Only purge puppet in Ubuntu, in Debian we use
# what the distribution provides.
if [ $(lsb_release --id -s) = "Ubuntu" ] ; then
sudo apt-get remove -y --purge facter puppet puppet-common
fi
DASHBOARD="horizon"
fi

@ -194,13 +194,23 @@ install_puppet() {
print_header 'Setup (Debian based)'
if [ "${MANAGE_REPOS}" == "true" ] ; then
PUPPET_CODENAME=$(lsb_release -s -c)
$SUDO mkdir -p /etc/apt/sources.list.d
echo "deb ${NODEPOOL_PUPPETLABS_MIRROR} ${PUPPET_CODENAME} puppet${PUPPET_MAJ_VERSION}" | $SUDO tee /etc/apt/sources.list.d/puppetlabs.list
$SUDO apt-key add files/GPG-KEY-puppetlabs
$SUDO apt-key add files/GPG-KEY-ceph
$SUDO apt-get update
DISTRIBUTION_VENDOR=$(lsb_release -s -i)
# In Debian, we use the distro packages
if [ "${DISTRIBUTION_VENDOR}" = "Ubuntu" ] ; then
$SUDO mkdir -p /etc/apt/sources.list.d
echo "deb ${NODEPOOL_PUPPETLABS_MIRROR} ${PUPPET_CODENAME} puppet${PUPPET_MAJ_VERSION}" | $SUDO tee /etc/apt/sources.list.d/puppetlabs.list
$SUDO apt-key add files/GPG-KEY-puppetlabs
$SUDO apt-key add files/GPG-KEY-ceph
$SUDO apt-get update
fi
fi
# In Debian, the distro package name is simply "puppet"
# and there's no reason to have it in a variable.
if [ "${DISTRIBUTION_VENDOR}" = "Debian" ] ; then
$SUDO apt-get install -y puppet
else
$SUDO apt-get install -y ${PUPPET_PKG}
fi
$SUDO apt-get install -y ${PUPPET_PKG}
elif is_fedora; then
print_header 'Setup (RedHat based)'
# EPEL does not work fine with RDO, we need to make sure EPEL is really disabled

Loading…
Cancel
Save