aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dependencies23
-rwxr-xr-xbin/provision21
2 files changed, 28 insertions, 16 deletions
diff --git a/bin/dependencies b/bin/dependencies
new file mode 100755
index 0000000..148ab84
--- /dev/null
+++ b/bin/dependencies
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# Simple shell provisioner for Vagrant instances.
+#
+
+# Install a package, thanks to the Hydra Suite.
+function provision_package {
+ if [ -z "$1" ]; then
+ return
+ fi
+
+ dpkg -s $1 &> /dev/null
+
+ if [ "$?" == "1" ]; then
+ echo "Installing package $1..."
+ DEBIAN_FRONTEND=noninteractive apt-get install $1 -y
+ fi
+}
+
+# Ensure basic packages are installed.
+for package in puppet ruby-hiera-puppet mr; do
+ provision_package $package
+done
diff --git a/bin/provision b/bin/provision
index fa76b53..4d096b8 100755
--- a/bin/provision
+++ b/bin/provision
@@ -3,25 +3,14 @@
# Simple shell provisioner for Vagrant instances.
#
-# Install a package, thanks to the Hydra Suite.
-function provision_package {
- if [ -z "$1" ]; then
- return
- fi
-
- dpkg -s $1 &> /dev/null
-
- if [ "$?" == "1" ]; then
- echo "Installing package $1..."
- DEBIAN_FRONTEND=noninteractive apt-get install $1 -y
- fi
-}
-
# Ensure the system is updated.
sudo apt-get update && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean
-# Ensure basic packages are installed.
-for package in sqlite3 libsqlite3-ruby ruby-hiera-puppet libactiverecord-ruby ruby-sqlite3 usbutils; do
+# Install dependencies
+source /vagrant/puppet/bin/dependencies
+
+# Ensure additional dependencies are installed.
+for package in sqlite3 libsqlite3-ruby libactiverecord-ruby ruby-sqlite3 usbutils; do
provision_package $package
done