author | ymh <ymh.work@gmail.com> |
Wed, 15 Feb 2017 10:51:15 +0100 | |
changeset 509 | fcc59d0ac8aa |
parent 428 | 76a47f714766 |
permissions | -rw-r--r-- |
28 | 1 |
#!/usr/bin/env bash |
428
76a47f714766
add memcached configuration option, small corrections for the build process and add installDrupal.sh file to the release
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
2 |
# Taken from https://github.com/hashicorp/puppet-bootstrap |
76a47f714766
add memcached configuration option, small corrections for the build process and add installDrupal.sh file to the release
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
3 |
# (under Mozilla Public License Version 2.0) |
28 | 4 |
# This bootstraps Puppet on CentOS 7.x |
5 |
# It has been tested on CentOS 7.0 64bit |
|
6 |
||
7 |
set -e |
|
8 |
||
9 |
REPO_URL="http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm" |
|
10 |
||
11 |
if [ "$EUID" -ne "0" ]; then |
|
12 |
echo "This script must be run as root." >&2 |
|
13 |
exit 1 |
|
14 |
fi |
|
15 |
||
16 |
if which puppet > /dev/null 2>&1; then |
|
17 |
echo "Puppet is already installed." |
|
18 |
exit 0 |
|
19 |
fi |
|
20 |
||
21 |
# Install wget |
|
22 |
echo "Installing wget..." |
|
23 |
yum install -y wget > /dev/null |
|
24 |
||
25 |
||
26 |
# Install puppet labs repo |
|
27 |
echo "Configuring PuppetLabs repo..." |
|
28 |
repo_path=$(mktemp) |
|
29 |
wget --output-document="${repo_path}" "${REPO_URL}" 2>/dev/null |
|
30 |
rpm -i "${repo_path}" >/dev/null |
|
31 |
||
32 |
# Install Puppet... |
|
33 |
echo "Installing puppet" |
|
34 |
yum install -y puppet > /dev/null |
|
35 |
||
36 |
echo "Puppet installed!" |