Merge "Support puppet5 for bionic"
This commit is contained in:
commit
0eaee6c131
@ -22,7 +22,9 @@ export PUPPET_VERSION=$(puppet_version)
|
|||||||
|
|
||||||
if [ "$PUPPET_VERSION" == "3" ] ; then
|
if [ "$PUPPET_VERSION" == "3" ] ; then
|
||||||
export MODULE_PATH=/etc/puppet/modules
|
export MODULE_PATH=/etc/puppet/modules
|
||||||
elif [ "$PUPPET_VERSION" == "4" ] ; then
|
elif [ "$PUPPET_VERSION" == "4" ] || [ "$PUPPET_VERSION" == "5" ]; then
|
||||||
|
# Using puppetlabs builds for wider compatability across distros
|
||||||
|
# than system packages provide.
|
||||||
export MODULE_PATH=/etc/puppetlabs/code/modules
|
export MODULE_PATH=/etc/puppetlabs/code/modules
|
||||||
else
|
else
|
||||||
echo "ERROR: unsupported puppet version $PUPPET_VERSION"
|
echo "ERROR: unsupported puppet version $PUPPET_VERSION"
|
||||||
|
@ -24,10 +24,6 @@ SETUP_PIP=${SETUP_PIP:-true}
|
|||||||
# Distro identification functions
|
# Distro identification functions
|
||||||
# note, can't rely on lsb_release for these as we're bare-bones and
|
# note, can't rely on lsb_release for these as we're bare-bones and
|
||||||
# it may not be installed yet)
|
# it may not be installed yet)
|
||||||
|
|
||||||
|
|
||||||
PUPPET_VERSION=${PUPPET_VERSION:-3}
|
|
||||||
|
|
||||||
function is_fedora {
|
function is_fedora {
|
||||||
[ -f /usr/bin/yum ] && cat /etc/*release | grep -q -e "Fedora"
|
[ -f /usr/bin/yum ] && cat /etc/*release | grep -q -e "Fedora"
|
||||||
}
|
}
|
||||||
@ -57,6 +53,13 @@ if is_fedora && [[ $(lsb_release -rs) -ge 22 ]]; then
|
|||||||
YUM=dnf
|
YUM=dnf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set the puppet version
|
||||||
|
if cat /etc/os-release | grep -qi bionic; then
|
||||||
|
# bionic only supports puppet 5
|
||||||
|
PUPPET_VERSION=${PUPPET_VERSION:-5}
|
||||||
|
else
|
||||||
|
PUPPET_VERSION=${PUPPET_VERSION:-3}
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Distro specific puppet installs
|
# Distro specific puppet installs
|
||||||
@ -216,6 +219,10 @@ function setup_puppet_ubuntu {
|
|||||||
puppetpkg=puppet-agent
|
puppetpkg=puppet-agent
|
||||||
PUPPET_VERSION=4.*
|
PUPPET_VERSION=4.*
|
||||||
FACTER_VERSION=3.*
|
FACTER_VERSION=3.*
|
||||||
|
elif [ "$PUPPET_VERSION" == "5" ] ; then
|
||||||
|
puppet_deb=puppet5-release-bionic.deb
|
||||||
|
PUPPET_VERSION=5.*
|
||||||
|
FACTER_VERSION=3.*
|
||||||
else
|
else
|
||||||
echo "Unsupported puppet version ${PUPPET_VERSION}"
|
echo "Unsupported puppet version ${PUPPET_VERSION}"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user