aboutsummaryrefslogtreecommitdiff
path: root/bin/dependencies
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-04 12:05:56 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-04 12:05:56 -0300
commit4c1bab861dba2f1d8bca76b5545729189a508f54 (patch)
tree7bb30e3c3b065ee1b28855ceba7ef320340aa9e3 /bin/dependencies
parent3f871bf28d79fd2446f8f07e10249b288b7bbc6e (diff)
downloadpuppet-bootstrap-4c1bab861dba2f1d8bca76b5545729189a508f54.tar.gz
puppet-bootstrap-4c1bab861dba2f1d8bca76b5545729189a508f54.tar.bz2
Make deps target
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