]> gitweb.fluxo.info Git - puppet-bootstrap.git/commitdiff
Deploy: dependencies in a single place
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 6 Mar 2016 01:37:38 +0000 (22:37 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 6 Mar 2016 01:37:38 +0000 (22:37 -0300)
bin/dependencies
bin/deploy

index 507145ba4004518bf86aafc279138dc0a67b9f32..94d37654ec2fb92e1995dae7b4e9dfd3514540c6 100755 (executable)
@@ -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
index 6088edbc19374354fb0ca0a1745ba9bc0bace826..9c5fbce259653e65268de79bd8bd2e1dc71d66cc 100755 (executable)
@@ -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