summaryrefslogtreecommitdiff
path: root/puppet/bin/provision
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-11-06 11:01:26 -0200
committerSilvio Rhatto <rhatto@riseup.net>2015-11-06 11:01:26 -0200
commit8748f432cdb01090767001523496f096345a492b (patch)
treecba4fd0d8d4501424c7fb5e84ba37dc2cdd7fca4 /puppet/bin/provision
parent506b62a99e35c69354e8bc977780e41117f1e6ca (diff)
parent5512c493e13998d4c83d7eab3d89e5a1c0836566 (diff)
downloaddebian-8748f432cdb01090767001523496f096345a492b.tar.gz
debian-8748f432cdb01090767001523496f096345a492b.tar.bz2
Merge commit '5512c493e13998d4c83d7eab3d89e5a1c0836566' into develop
Conflicts: puppet/puppet.conf
Diffstat (limited to 'puppet/bin/provision')
-rwxr-xr-xpuppet/bin/provision30
1 files changed, 19 insertions, 11 deletions
diff --git a/puppet/bin/provision b/puppet/bin/provision
index e200e51..16f102f 100755
--- a/puppet/bin/provision
+++ b/puppet/bin/provision
@@ -3,25 +3,33 @@
# Simple shell provisioner for Vagrant instances.
#
-# Ensure the system is updated.
-sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean
+# Parameters
+DIRNAME="`dirname $0`"
+
+# Load dependencies
+source $DIRNAME/dependencies
-# Install dependencies
-source /vagrant/puppet/bin/dependencies
+# Ensure the system is updated.
+$SUDO apt-get update && DEBIAN_FRONTEND=noninteractive $SUDO apt-get dist-upgrade -y && $SUDO apt-get autoremove -y && $SUDO apt-get clean
# Ensure additional dependencies are installed.
-for package in sqlite3 libsqlite3-ruby libactiverecord-ruby ruby-sqlite3 usbutils; do
+for package in usbutils; do
+ provision_package $package
+done
+
+# Storeconfigs support
+for package in ruby-sqlite3 ruby-activerecord ruby-activerecord-deprecated-finders; do
provision_package $package
done
-# Link hiera configuration.
+# Link hiera configuration if needed.
if [ ! -h "/etc/puppet/hiera.yaml" ]; then
- sudo rm -f /etc/puppet/hiera.yaml
- sudo ln -s /vagrant/puppet/hiera/hiera.yaml /etc/puppet/hiera.yaml
+ $SUDO rm -f /etc/puppet/hiera.yaml
+ $SUDO ln -s $DIRNAME/../hiera/hiera.yaml /etc/puppet/hiera.yaml
fi
-# Link puppet configuration.
+# Link puppet configuration if needed.
if [ ! -h "/etc/puppet/puppet.conf" ]; then
- sudo rm -f /etc/puppet/puppet.conf
- sudo ln -s /vagrant/puppet/puppet.conf /etc/puppet/puppet.conf
+ $SUDO rm -f /etc/puppet/puppet.conf
+ $SUDO ln -s $DIRNAME/../puppet.conf /etc/puppet/puppet.conf
fi