mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Delete runtags.deprecated
This commit is contained in:
parent
8aee808587
commit
f9cdee2d92
1 changed files with 0 additions and 47 deletions
|
@ -1,47 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
INVENTORY="ansible_hosts"
|
|
||||||
PLAYBOOK="iiab.yml"
|
|
||||||
#PLAYBOOK="iiab-stages.yml"
|
|
||||||
CWD=`pwd`
|
|
||||||
|
|
||||||
export ANSIBLE_LOG_PATH="$CWD/iiab-debug.log"
|
|
||||||
|
|
||||||
if [ ! -f $PLAYBOOK ]; then
|
|
||||||
echo "Exiting: IIAB Playbook not found."
|
|
||||||
echo "Please run this in /opt/iiab/iiab (top level of the git repo)."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Is the following stanza nec?
|
|
||||||
if [ ! -f /etc/iiab/config_vars.yml ]; then
|
|
||||||
mkdir -p /etc/iiab
|
|
||||||
echo "{}" > /etc/iiab/config_vars.yml
|
|
||||||
fi
|
|
||||||
|
|
||||||
tags=$(echo $1 | tr "," "\n")
|
|
||||||
|
|
||||||
if [ "$tags" == "" ]; then
|
|
||||||
echo " usage: ./runtags <tagname>"
|
|
||||||
echo " usage: ./runtags <tagname1>,<tagname2>,<tagname3>"
|
|
||||||
echo " Can take a single value or a comma-separated list (no spaces within the list!)"
|
|
||||||
echo " Now retrieving a list of possible Ansible playbook and tagname values..."
|
|
||||||
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local --list-tags
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
found="N"
|
|
||||||
|
|
||||||
for tag in $tags; do
|
|
||||||
if [ "$tag" == "0-init" ]; then
|
|
||||||
found="Y"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
taglist=$1
|
|
||||||
|
|
||||||
if [ "$found" == "N" ]; then
|
|
||||||
taglist="0-init,"$taglist
|
|
||||||
fi
|
|
||||||
|
|
||||||
ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local --tags=$taglist
|
|
Loading…
Add table
Add a link
Reference in a new issue