aboutsummaryrefslogtreecommitdiff
path: root/bin/dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'bin/dependencies')
-rwxr-xr-xbin/dependencies23
1 files changed, 23 insertions, 0 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