puppet: Add a manifest for provisioning puppet

refs #6842
This commit is contained in:
Eric Lippmann 2014-12-15 18:00:01 +01:00
parent 379da5e5f3
commit 8dc61fc709
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
#!/bin/bash
set -e
if which puppet >/dev/null 2>&1; then
exit 0
fi
RELEASEVER=$(rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release))
case $RELEASEVER in
6|7)
PUPPET="http://yum.puppetlabs.com/puppetlabs-release-el-${RELEASEVER}.noarch.rpm"
;;
*)
echo "Unknown release version: $RELEASEVER" >&2
exit 1
;;
esac
echo "Adding puppet repository.."
rpm --import "https://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs"
rpm -ivh $PUPPET >/dev/null
echo "Installing puppet.."
yum install -y puppet >/dev/null