From bfb27a5b401ad6c998a5ee6be2ba2cf8c4c8e589 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 26 Oct 2015 19:06:04 -0200 Subject: Deploy: fix localhost deploy command --- lib/hydra/deploy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/hydra/deploy b/lib/hydra/deploy index b97897d..4e86488 100644 --- a/lib/hydra/deploy +++ b/lib/hydra/deploy @@ -13,11 +13,12 @@ function hydra_deploy_setup { # Deploy in a local folder if [ ! -z "$2" ]; then NODE="$2" + DEPLOY_BASE="/etc" DEPLOY_COMMAND="$HYDRA_CONNECT $NODE sudo" - RSYNC_PATH="sudo rsync" DEPLOY_OPTS="$HYDRA_FOLDER/puppet/ $NODE:/etc/puppet/" - FQDN="`$DEPLOY_COMMAND cat /etc/hostname`" DEPLOY_DEST="$FQDN:" + RSYNC_PATH="sudo rsync" + FQDN="`$DEPLOY_COMMAND cat /etc/hostname`" COPY_PATH="$RSYNC_PATH" hydra_deploy_set_manifest else @@ -28,6 +29,7 @@ function hydra_deploy_setup { # Deploy in a remote host if [ ! -z "$2" ]; then FOLDER="$2" + DEPLOY_BASE="/etc" DEPLOY_COMMAND="$SUDO chroot $FOLDER" DEPLOY_OPTS="$HYDRA_FOLDER/puppet/ $FOLDER/etc/puppet/" DEPLOY_DEST="$FOLDER" @@ -48,8 +50,9 @@ function hydra_deploy_setup { fi else # Deploy on the localhost - DEPLOY_RSYNC="" + DEPLOY_BASE="$HYDRA_FOLDER" DEPLOY_COMMAND="$SUDO" + DEPLOY_RSYNC="" FQDN="`cat /etc/hostname`" PUPPET_OPTS="--confdir=$HYDRA_FOLDER/puppet --modulepath=$HYDRA_FOLDER/puppet/modules" hydra_deploy_set_manifest $HYDRA_FOLDER @@ -62,7 +65,7 @@ function hydra_deploy_setup { # Puppet command if [ -e "$HYDRA_FOLDER/puppet/bin/deploy" ]; then - DEPLOY_PUPPET="/etc/puppet/bin/deploy" + DEPLOY_PUPPET="$DEPLOY_BASE/puppet/bin/deploy" else DEPLOY_PUPPET="LC_ALL=C puppet apply $PUPPET_OPTS $PUPPET_MANIFEST" fi -- cgit v1.2.3