i have a condition where lower plays don't get executed when upper play fail on some condition . i need to run my second play also inside same yml file if above play gets fail, how can i do this ?? play with localhost group dont get executed.
[admin@ansible-poc ansible]$ ansible-playbook redhat.yml
PLAY [redhat] **********************************************************************************************************************************************************
TASK [Gathering Facts] *************************************************************************************************************************************************
ok: [169.144.61.82]
TASK [debug] ***********************************************************************************************************************************************************
ok: [169.144.61.82] => {
"msg": "abc"
}
TASK [fail] ************************************************************************************************************************************************************
fatal: [169.144.61.82]: FAILED! => {"changed": false, "msg": "failing"}
to retry, use: --limit @/home/admin/ansible/redhat.retry
PLAY RECAP *************************************************************************************************************************************************************
169.144.61.82 : ok=2 changed=0 unreachable=0 failed=1