# Abort playbook if host is not ready

**URL:** <https://forum.ansible.com/t/abort-playbook-if-host-is-not-ready/33041>\
**Category:** Ansible Project\
**Created:** [May 28, 2020, 5:52pm UTC](https://forum.ansible.com/t/abort-playbook-if-host-is-not-ready/33041 "2020-05-28T17:52:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laci](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@Laci](https://forum.ansible.com/u/Laci)\
**Post date:** [May 28, 2020, 5:52pm UTC](https://forum.ansible.com/t/abort-playbook-if-host-is-not-ready/33041/1 "2020-05-28T17:52:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [June 15, 2020, 6:06am UTC](https://forum.ansible.com/t/abort-playbook-if-host-is-not-ready/33041/2 "2020-06-15T06:06:39Z")

</div>

[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_error\_handling.html#aborting-the-play](https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#aborting-the-play)

---

<div class="post-metadata">

**Author:** ![Laci](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@Laci](https://forum.ansible.com/u/Laci)\
**Post date:** [June 15, 2020, 11:16am UTC](https://forum.ansible.com/t/abort-playbook-if-host-is-not-ready/33041/3 "2020-06-15T11:16:40Z")

</div>

Thank you!
