diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-10-26 19:06:04 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-10-26 19:06:04 -0200 |
commit | bfb27a5b401ad6c998a5ee6be2ba2cf8c4c8e589 (patch) | |
tree | 81bd211993d8c0792fceebd76ac285c790b27682 /lib | |
parent | 2ab0d39c3b742110660f7b0445bf32bc24df4fb5 (diff) | |
download | hydra-bfb27a5b401ad6c998a5ee6be2ba2cf8c4c8e589.tar.gz hydra-bfb27a5b401ad6c998a5ee6be2ba2cf8c4c8e589.tar.bz2 |
Deploy: fix localhost deploy command
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hydra/deploy | 11 |
1 files 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 |