diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-05-27 10:53:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-05-27 10:53:26 -0300 |
commit | 8870751d26e11afd592d85f85c3f236ceb8d903c (patch) | |
tree | 28eba7b05ea7f9a21342f1f7493748ef673552b9 | |
parent | 295a81f56e90ac87568f51b5302742164f303a52 (diff) | |
download | hydra-8870751d26e11afd592d85f85c3f236ceb8d903c.tar.gz hydra-8870751d26e11afd592d85f85c3f236ceb8d903c.tar.bz2 |
Deploy: support for class names
-rwxr-xr-x | share/hydra/deploy | 10 |
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 |