diff --git a/install_puppet.sh b/install_puppet.sh new file mode 100755 index 0000000000..d890795ee9 --- /dev/null +++ b/install_puppet.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# Copyright 2013 OpenStack Foundation. +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# Copyright 2013 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +# Install puppet version 2.7.x from puppetlabs. +# The repo and preferences files are also managed by puppet, so be sure +# to keep them in sync with this file. + +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 + yum update -y + # NOTE: enable the optional-rpms channel (if not already enabled) + # yum-config-manager --enable rhel-6-server-optional-rpms + yum install -y git puppet-2.7.20-1.el6.noarch +else + #defaults to Ubuntu + cat > /etc/apt/preferences.d/00-puppet.pref <