mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
commit
a5d8d8ec36
2 changed files with 32 additions and 31 deletions
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
hostfile = /etc/ansible/hosts
|
hostfile = /etc/ansible/hosts
|
||||||
library = /usr/share/ansible
|
library = /usr/share/ansible
|
||||||
remote_tmp = ~/.ansible/tmp
|
remote_tmp = /opt/iiab/iiab/.ansible/tmp
|
||||||
local_tmp = ~/.ansible/tmp
|
local_tmp = /opt/iiab/iiab/.ansible/tmp
|
||||||
pattern = *
|
pattern = *
|
||||||
forks = 5
|
forks = 5
|
||||||
poll_interval = 15
|
poll_interval = 15
|
||||||
|
|
17
runtags
17
runtags
|
@ -22,6 +22,15 @@ fi
|
||||||
|
|
||||||
tags=$(echo $1 | tr "," "\n")
|
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"
|
found="N"
|
||||||
|
|
||||||
for tag in $tags
|
for tag in $tags
|
||||||
|
@ -30,7 +39,6 @@ do
|
||||||
then
|
then
|
||||||
found="Y"
|
found="Y"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# echo $found
|
# echo $found
|
||||||
|
@ -42,12 +50,5 @@ then
|
||||||
taglist="prep,"$taglist
|
taglist="prep,"$taglist
|
||||||
fi
|
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"
|
export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-debug.log"
|
||||||
ansible-playbook -i ansible_hosts iiab.yml --connection=local --tags="""$taglist"""
|
ansible-playbook -i ansible_hosts iiab.yml --connection=local --tags="""$taglist"""
|
||||||
|
|
Loading…
Reference in a new issue