aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/deploy9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/hydra/deploy b/lib/hydra/deploy
index 87cc8cf..ceacc3e 100644
--- a/lib/hydra/deploy
+++ b/lib/hydra/deploy
@@ -22,9 +22,16 @@ function hydra_deploy_setup {
# Deploy in a remote host
if [ ! -z "$2" ]; then
NODE="$2"
+ FQDN="$(basename `find $HYDRA_FOLDER/puppet/config/node/ -name $NODE'.*' | head -n 1` .yaml)"
+
+ # Check for config/node name
+ if [ -z "$FQDN" ]; then
+ echo "Cannot find config for $NODE."
+ exit 1
+ fi
+
DEPLOY_BASE="/etc"
DEPLOY_COMMAND="$HYDRA_CONNECT $NODE sudo"
- FQDN="`$DEPLOY_COMMAND cat /etc/hostname`"
DEPLOY_OPTS="$HYDRA_FOLDER/puppet/ $NODE:/etc/puppet/"
DEPLOY_DEST="$FQDN:"
RSYNC_PATH="sudo rsync -q"