Remove Puppet 2/Puppet 3 logic
Everything is 3 now. Change-Id: I026a2067883a2edb9c0e153cad68fc473d67214b
This commit is contained in:
parent
894b4c822d
commit
d3d8c2240f
@ -16,12 +16,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
# Test condition to install puppet 3
|
|
||||||
PUPPET_VERSION=${PUPPET_VERSION:-3}
|
|
||||||
if [ "$PUPPET_VERSION" = '3' ]; then
|
|
||||||
THREE=yes
|
|
||||||
echo "Running in 3 mode"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Distro identification functions
|
# Distro identification functions
|
||||||
@ -67,10 +61,6 @@ function setup_puppet_fedora {
|
|||||||
|
|
||||||
|
|
||||||
mkdir -p /etc/puppet/modules/
|
mkdir -p /etc/puppet/modules/
|
||||||
if [ "$THREE" != 'yes' ]; then
|
|
||||||
gem install hiera hiera-puppet
|
|
||||||
ln -s /usr/local/share/gems/gems/hiera-puppet-* /etc/puppet/modules/
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Puppet expects the pip command named as pip-python on
|
# Puppet expects the pip command named as pip-python on
|
||||||
# Fedora, as per the packaged command name. However, we're
|
# Fedora, as per the packaged command name. However, we're
|
||||||
@ -140,10 +130,6 @@ enabled=1
|
|||||||
gpgcheck=1
|
gpgcheck=1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "$THREE" != 'yes' ]; then
|
|
||||||
echo 'exclude=puppet-2.8* puppet-2.9* puppet-3* facter-2*' >> /etc/yum.repos.d/puppetlabs.repo
|
|
||||||
fi
|
|
||||||
|
|
||||||
yum update -y
|
yum update -y
|
||||||
|
|
||||||
# see comments in setup_puppet_fedora
|
# see comments in setup_puppet_fedora
|
||||||
@ -161,18 +147,12 @@ function setup_puppet_ubuntu {
|
|||||||
rubypkg=rubygems
|
rubypkg=rubygems
|
||||||
else
|
else
|
||||||
rubypkg=ruby
|
rubypkg=ruby
|
||||||
THREE=yes
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$THREE" == 'yes' ]; then
|
|
||||||
PUPPET_VERSION=3.*
|
PUPPET_VERSION=3.*
|
||||||
PUPPETDB_VERSION=2.*
|
PUPPETDB_VERSION=2.*
|
||||||
FACTER_VERSION=2.*
|
FACTER_VERSION=2.*
|
||||||
else
|
|
||||||
PUPPET_VERSION=2.7*
|
|
||||||
PUPPETDB_VERSION=1.*
|
|
||||||
FACTER_VERSION=1.*
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat > /etc/apt/preferences.d/00-puppet.pref <<EOF
|
cat > /etc/apt/preferences.d/00-puppet.pref <<EOF
|
||||||
Package: puppet puppet-common puppetmaster puppetmaster-common puppetmaster-passenger
|
Package: puppet puppet-common puppetmaster puppetmaster-common puppetmaster-passenger
|
||||||
|
Loading…
Reference in New Issue
Block a user