Ansible module to test remote server availability

Hi Ansible Experts,
We need to enable failover test between 2 remote hosts in Ansible playbook to run tasks. If host1 down then the host2 should be delegated to run the task. If both are down then playbook should exit with an email reporting remote hosts are down. Can you please suggest right Ansible module to perform this activity?

I have tried using Ansible modules like ping, service_facts, wait_for. Looking for suitable Ansible module to accomplish this activity to test the remote server availability?

Regards
Saravanan