On 13. okt. 2016 15:42, 'Anas Theo' via Ansible Project wrote:
As an alternative it could also
be useful to test SSH connectivity through explicit commands in all remote
hosts before executing the rest of the .yml file. Thanks for your help.

If you have gather_facts as true and set "any_errors_fatal: true", it will stop at the setup task(gathering of facts) and not proceed any task or roles if one host fails.

If gather_facts is false you can make a dummy task with ping module in pre_tasks like so

---
- hosts: all
  any_errors_fatal: true
  pre_tasks:
    - ping:

--
Kai Stian Olstad

--
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1bd9ce16-0d87-65ee-17cb-14bb24805e6c%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to