host issue

HI team,

we have two domain , like google and googlea. in few servers we have a problem to connecting in a and b.i want to run a command if a doesn’t allow me to login it should to go to b and execute. Please help me

shall I use like in inventory file ?****.google[a||b].com

Vinod,
You can rely on the serial param.

- name: test play
  hosts: webservers
  serial: 1
And track the status in a variable or using local file to decide whether to execute task on the 2nd host or not

Ramu

Thanks for your reply. But here we have 1000 servers where I need to run like my command should try to execute in domain A , if domain is not reachable the it should automatically trigger to domain B