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:
commit
1405069dcf
1 changed files with 9 additions and 8 deletions
17
runtags
17
runtags
|
@ -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"""
|
||||
|
|
Loading…
Reference in a new issue