]> gitweb.fluxo.info Git - hydra.git/commitdiff
Deploy: support bin/deploy from puppet repo
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 26 Oct 2015 15:56:25 +0000 (13:56 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 26 Oct 2015 15:56:25 +0000 (13:56 -0200)
lib/hydra/deploy

index ba661525c9f328c134ef2a5f32e8d7f1efec1e6c..68ec9b0ef6da94beffaab29d6f4b7220f9ca44e1 100644 (file)
@@ -59,7 +59,15 @@ function hydra_deploy_setup {
   DOMAIN="`echo $FQDN | cut -d . -f 2-`"
   ROLE="`hydra_yaml_param nodo::role $HYDRA_FOLDER/puppet/hiera/node/$FQDN.yaml`"
   LOCATION="`hydra_yaml_param nodo::location $HYDRA_FOLDER/puppet/hiera/node/$FQDN.yaml`"
-  DEPLOY_PUPPET="LC_ALL=C puppet apply $PUPPET_OPTS $PUPPET_MANIFEST"
+
+  # Puppet command
+  if [ -e "$HYDRA_FOLDER/puppet/bin/deploy" ]; then
+    DEPLOY_PUPPET="/etc/puppet/bin/deploy"
+  else
+    DEPLOY_PUPPET="LC_ALL=C puppet apply $PUPPET_OPTS $PUPPET_MANIFEST"
+  fi
+
+  # Deployment command
   DEPLOY_APPLY="$DEPLOY_COMMAND $DEPLOY_PUPPET"
 
   # Check for manifest