aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-05 22:37:38 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-05 22:37:38 -0300
commit73d6006ff57a1c3eea6732bb40cb945d68d90040 (patch)
tree3b584dc06a9092b156307902c5ab8bc5fdb9f6cb
parent364912a73905340ea2d48598afbd990914b2e0d9 (diff)
downloadpuppet-bootstrap-73d6006ff57a1c3eea6732bb40cb945d68d90040.tar.gz
puppet-bootstrap-73d6006ff57a1c3eea6732bb40cb945d68d90040.tar.bz2
Deploy: dependencies in a single place
-rwxr-xr-xbin/dependencies11
-rwxr-xr-xbin/deploy3
2 files changed, 11 insertions, 3 deletions
diff --git a/bin/dependencies b/bin/dependencies
index 507145b..94d3765 100755
--- a/bin/dependencies
+++ b/bin/dependencies
@@ -3,6 +3,15 @@
# Puppet bootstrap dependencies.
#
+# Parameters
+DEPENDENCIES="puppet-common git mr whois"
+DEPLOY_DEPENDENCIES="ruby-sqlite3 ruby-activerecord"
+
+# Additional non-wheezy package
+if [ "`head -c 1 /etc/debian_version`" != '7' ]; then
+ DEPLOY_DEPENDENCIES="$DEPLOY_DEPENDENCIES ruby-activerecord-deprecated-finders"
+fi
+
# Install a package, thanks to the Hydra Suite.
function provision_package {
if [ -z "$1" ]; then
@@ -23,6 +32,6 @@ if [ "`whoami`" != 'root' ]; then
fi
# Ensure basic packages are installed.
-for package in puppet git mr whois; do
+for package in $DEPENDENCIES; do
provision_package $package
done
diff --git a/bin/deploy b/bin/deploy
index 6088edb..9c5fbce 100755
--- a/bin/deploy
+++ b/bin/deploy
@@ -6,7 +6,6 @@
# Parameters
DIRNAME="`dirname $0`"
BASEDIR="$DIRNAME/.."
-DEPLOY_DEPENDENCIES="puppet ruby-sqlite3 ruby-activerecord ruby-activerecord-deprecated-finders"
# Determine hostname
if [ ! -z "$1" ]; then
@@ -23,7 +22,7 @@ fi
# Check manifest
if [ ! -e "$PUPPET_MANIFEST" ]; then
- echo "no manifest found for $FQDN"
+ echo "No manifest found for $FQDN"
exit 1
fi