host issue

28 views
Skip to first unread message

vinod...@gmail.com

unread,
Aug 2, 2018, 11:15:07 AM8/2/18
to Ansible Project
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

vinod...@gmail.com

unread,
Aug 2, 2018, 11:32:18 AM8/2/18
to Ansible Project
shall I use like in inventory file ?****.google[a||b].com

Ramu

unread,
Aug 2, 2018, 7:39:23 PM8/2/18
to ansible...@googlegroups.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

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b5fea70c-80ed-4b45-adf0-20d7c5e9ae0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vinoth kumar

unread,
Aug 2, 2018, 11:10:06 PM8/2/18
to ansible...@googlegroups.com
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

Reply all
Reply to author
Forward
0 new messages