Pin puppet version via puppetlabs.repo on RHEL.

Updates our install_puppet.sh script so that we pin the puppet
version on RHEL.

In doing this I dropped the explicit puppet version used on
the 'yum install' command since it is no longer required.

Here doc is quoted to avoid variable expansion.

Change-Id: I5e45182b67fe9533b92d1132fef6888fdd5d96b1
Reviewed-on: https://review.openstack.org/23574
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
This commit is contained in:
Dan Prince 2013-03-05 11:44:38 -05:00 committed by Jenkins
parent 5353964c52
commit 5fead43d94
1 changed files with 12 additions and 1 deletions

View File

@ -23,12 +23,23 @@
if cat /etc/*release | grep "Red Hat" &> /dev/null; then
rpm -qi epel-release &> /dev/null || rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-6.noarch.rpm
cat > /etc/yum.repos.d/puppetlabs.repo <<"EOF"
[puppetlabs-products]
name=Puppet Labs Products El 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/6/products/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=1
exclude=puppet-2.8* puppet-2.9* puppet-3*
EOF
yum update -y
# NOTE: enable the optional-rpms channel (if not already enabled)
# yum-config-manager --enable rhel-6-server-optional-rpms
# NOTE: we preinstall lsb_release to ensure facter sets lsbdistcodename
yum install -y redhat-lsb-core git puppet-2.7.20-1.el6.noarch
yum install -y redhat-lsb-core git puppet
else
#defaults to Ubuntu
cat > /etc/apt/preferences.d/00-puppet.pref <<EOF