Abort playbook if host is not ready

Is there a good way to abort the playbook if host is not ready?
For example I want to run a playbook against thisserver, but thisserver is unreachable by ssh or it is reachable but there is no python install. If any of these occurs I’d like to playbook to abort and stop processing tasks

https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-the-play

Thank you!