aboutsummaryrefslogtreecommitdiff
path: root/share/hydra
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-27 10:53:26 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-27 10:53:26 -0300
commit8870751d26e11afd592d85f85c3f236ceb8d903c (patch)
tree28eba7b05ea7f9a21342f1f7493748ef673552b9 /share/hydra
parent295a81f56e90ac87568f51b5302742164f303a52 (diff)
downloadhydra-8870751d26e11afd592d85f85c3f236ceb8d903c.tar.gz
hydra-8870751d26e11afd592d85f85c3f236ceb8d903c.tar.bz2
Deploy: support for class names
Diffstat (limited to 'share/hydra')
-rwxr-xr-xshare/hydra/deploy10
1 files changed, 10 insertions, 0 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy
index 9a43edf..015f81a 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -31,6 +31,16 @@ NODES="$*"
# Build node list
if [ -z "$NODES" ]; then
NODES="`hydra $HYDRA nodes`"
+else
+ # Check if first param is a node name, otherwise assume its a class
+ if [ -z "$2" ]; then
+ NODEFILE="$(basename `find $HYDRA_FOLDER/puppet/config/node/ -name $1'.*' | head -n 1` .yaml)"
+
+ # Check for config/node name
+ if [ "$NODEFILE" == ".yaml" ]; then
+ NODES="`hydra $HYDRA nodes $1`"
+ fi
+ fi
fi
# Deploy requirements