dev/provisioning/bootstrap-puppet.sh
author ymh <ymh.work@gmail.com>
Tue, 19 Jan 2016 19:18:34 +0100
changeset 109 d22ed5792f8e
parent 28 b0b56e0f8c7f
child 428 76a47f714766
permissions -rw-r--r--
Correct transaction management. cf. bug https://openrdf.atlassian.net/browse/SES-2295 and tomcat default management of PUT request with form data (application/x-www-form-urlencoded encoded)

#!/usr/bin/env bash
# This bootstraps Puppet on CentOS 7.x
# It has been tested on CentOS 7.0 64bit

set -e

REPO_URL="http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm"

if [ "$EUID" -ne "0" ]; then
  echo "This script must be run as root." >&2
  exit 1
fi

if which puppet > /dev/null 2>&1; then
  echo "Puppet is already installed."
  exit 0
fi

# Install wget
echo "Installing wget..."
yum install -y wget > /dev/null


# Install puppet labs repo
echo "Configuring PuppetLabs repo..."
repo_path=$(mktemp)
wget --output-document="${repo_path}" "${REPO_URL}" 2>/dev/null
rpm -i "${repo_path}" >/dev/null

# Install Puppet...
echo "Installing puppet"
yum install -y puppet > /dev/null

echo "Puppet installed!"