1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00

Merge pull request #297 from jvonau/runtags

runtags - replace usage warning

(Clarified usage explanation (what "./runtags" shows when run w/o params))
This commit is contained in:
A Holt 2017-09-21 16:39:22 -04:00 committed by GitHub
commit 1405069dcf

17
runtags
View file

@ -22,6 +22,15 @@ fi
tags=$(echo $1 | tr "," "\n")
if [ "$tags" == "" ]
then
echo " usage: ./runtags <tagname>"
echo " Can take a single value or a comma separated list."
echo " Now retrieving a list of possible values..."
ansible-playbook -i ansible_hosts iiab.yml --connection=local --list-tag
exit 0
fi
found="N"
for tag in $tags
@ -30,7 +39,6 @@ do
then
found="Y"
fi
done
# echo $found
@ -42,12 +50,5 @@ then
taglist="prep,"$taglist
fi
# script to run a specific tag in the current playbook
if [ $# -ne 1 ]; then
echo "usage: $0 <tagname>"
echo
echo " If you would like a list of possible values, enter $0 XXX"
exit 1
fi
export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-debug.log"
ansible-playbook -i ansible_hosts iiab.yml --connection=local --tags="""$taglist"""