I have 2 groups created in hosts file as given below. I have a playbook consisting of 2 plays - the 1st play will be executed on IP in ‘ACTIVEFIREWALL’ group and 2nd play will be executed on IP in ‘STANDBYFIREWALL’ group.
Many a times, i have no ip to be give for ‘STANDBYFIREWALL’ group (so the ip portion remains blank but everything else mentioned below remains on hosts file). So the 2nd play just stops and does nothing until timeout. However when i delete the entire ‘STANDBYFIREWALL’ group from inventory file, Ansible ignores the 2nd play containing ‘STANDBYFIREWALL’ group and moves on.
Is there any ways i can make Ansible to move on without deleting STANDBYFIREWALL group from hosts file when there is no IP to give?
[ACTIVEFIREWALL]
FW1 ansible_host=10.224.240.241
[ACTIVEFIREWALL:vars]
ansible_user=username
ansible_ssh_pass=password
[STANDBYFIREWALL]
FW2 ansible_host=10.224.240.244
[STANDBYFIREWALL:vars]
ansible_user=username
ansible_ssh_pass=password
Thanks,
Vikram