Skip to content

Commit

Permalink
puppet: Add a manifest for provisioning puppet
Browse files Browse the repository at this point in the history
refs #6842
  • Loading branch information
lippserd committed Dec 15, 2014
1 parent 379da5e commit 8dc61fc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .puppet/manifests/puppet.sh
@@ -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

0 comments on commit 8dc61fc

Please sign in to comment.