forked from lorello/ubuntu-boxen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·33 lines (23 loc) · 1.13 KB
/
install.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
#!/bin/bash
echo "This script requires root privileges, you will be asked your sudo password"
# Setup PuppetLabs repository
echo -e "Getting PuppetLabs Source"
DISTRO=$(grep DISTRIB_CODENAME /etc/lsb-release | awk -F= '{print $2}')
wget -q https://apt.puppetlabs.com/puppetlabs-release-$DISTRO.deb
sudo dpkg -i puppetlabs-release-$DISTRO.deb
echo -e "Running apt-get update"
sudo apt-get update -y -qq
# Install puppet without the agent init script
echo -e "Installing Puppet"
sudo apt-get install git puppet-common hiera -y -qq
# Download uboxen code
echo -e "Fetching uBoxen"
cd /opt
[ ! -d /opt/ubuntu-boxen ] && sudo git clone https://github.com/Americas/ubuntu-boxen.git
sudo puppet resource file /usr/local/bin/uboxen ensure=link target=/opt/ubuntu-boxen/uboxen
sudo puppet resource file /etc/puppet/manifests/uboxen.pp ensure=link target=/opt/ubuntu-boxen/uboxen.pp
for f in `ls /opt/ubuntu-boxen/modules`; do
sudo puppet resource file /etc/puppet/modules/$f ensure=link target=/opt/ubuntu-boxen/modules/$f;
done
# Finish
echo -e "\n\nInstallation ended successfully (I hope).\n\nEnjoy Ubuntu Boxen running 'uboxen' at your shell prompt"