-
Notifications
You must be signed in to change notification settings - Fork 1
/
boot.sh
32 lines (26 loc) · 858 Bytes
/
boot.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
#
# This bootstraps Puppet on Ubuntu 12.04 LTS.
#
set -e
REPO_DEB_URL="http://apt.puppetlabs.com/puppetlabs-release-precise.deb"
#--------------------------------------------------------------------
# NO TUNABLES BELOW THIS POINT
#--------------------------------------------------------------------
if [ "$EUID" -ne "0" ]; then
echo "This script must be run as root." >&2
exit 1
fi
# Install the PuppetLabs repo
echo "Configuring PuppetLabs repo..."
repo_deb_path=$(mktemp)
wget --output-document=${repo_deb_path} ${REPO_DEB_URL} 2>/dev/null
dpkg -i ${repo_deb_path} >/dev/null
apt-get update >/dev/null
# Install Puppet
echo "Installing Puppet..."
apt-get install -y puppet >/dev/null
echo "Puppet installed!"
cd ${BASH_SOURCE%/*}
sudo git submodule update --init
sudo puppet apply --modulepath=./modules ./manifests/master.pp