aboutsummaryrefslogtreecommitdiff
path: root/share/hydra/deploy
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-31 09:27:27 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-31 09:27:27 -0300
commitc3911172d911060184a10413106f436c3f78ecbf (patch)
treed9b4fe5ccb42691d478008bf5ce978a8ae12eee0 /share/hydra/deploy
parent3719691aadbf7710840f30278f017139ff62d144 (diff)
downloadhydra-c3911172d911060184a10413106f436c3f78ecbf.tar.gz
hydra-c3911172d911060184a10413106f436c3f78ecbf.tar.bz2
Deploy: possible localhost handling for ansible
Diffstat (limited to 'share/hydra/deploy')
-rwxr-xr-xshare/hydra/deploy10
1 files changed, 7 insertions, 3 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy
index ec4153f..9b8db2f 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -251,7 +251,7 @@ EOF
done
#
-# Deploy using ansible own iterator
+# Deploy using ansible's own iterator
#
if [ -e "$HYDRA_FOLDER/ansible/ansible.cfg" ]; then
# Command line arguments
@@ -264,7 +264,7 @@ if [ -e "$HYDRA_FOLDER/ansible/ansible.cfg" ]; then
#else
if [ ! -z "$NODES" ]; then
# Check if first param is a node name, otherwise assume its a class
- if [ -z "$2" ]; then
+ if [ -z "$2" ] && [ "$1" != "localhost" ]; then
NODES="`BACKEND=ansible hydra $HYDRA nodes $1`"
if [ -z "$NODES" ]; then
@@ -276,7 +276,11 @@ if [ -e "$HYDRA_FOLDER/ansible/ansible.cfg" ]; then
#NODES="`echo $NODES | xargs | sed -e "s/^/'~(/" -e "s/ /|/g" -e "s/$/)'/"`"
NODES="$*"
fi
- fi
+ # This can be handled directly by the ansible hosts file
+ # http://ansible.pickle.io/post/86598332429/running-ansible-playbook-in-localhost
+ #elif [ "$NODES" == "localhost" ]; then
+ # NODES="`cat /etc/hostname`"
+ #fi
else
NODES="all"
fi