I’m on the latest version of ansible and python
I wrote a testcase depicting the issue I m facing.
I run the below shell-script and pass three application names each of which is an ansible role that executes task on the same node and sleeps (waits) for 10 seconds which means in all it will execute for more than (3X10) 30 seconds if the execution is not parallel
Below is my code for shell script and roles that I use to run my ansible-roles playbook:
cat /web/admin/playbooks/testpar/run_me_for_restarts.sh
SH_APP=$1
echo “OK… Let us execute the Ansible Playbook now…”
for i in $(echo $SH_APP | sed “s/,/ /g”)
do
ansible-playbook -v -i /web/admin/playbooks/testpar/va.hosts /web/admin/playbooks/testpar/va_action.yml -e APPNAME=$i
done
$ cat /web/admin/playbooks/testpar/va_action.yml