Hi,
I’d like to clarify some functionality. When running a playbook with multiple plays and one play can’t connect to a host, ansible displays an error:
PLAY [First Play] *********************************************
TASK [setup] *******************************************************************
fatal: [remote-host]: UNREACHABLE! => {“changed”: false, “msg”: “ERROR! SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue”, “unreachable”: true}
PLAY [Next Play] **********************************************
This is fine as the host can’t be connected however rather than stopping the playbook execution it continues. My question is:
- If the playbook can’t connect to a host shouldn’t it fail fast and stop?
- Or is this expected behaviour? In that it fails the first play as it can’t connect to the remote-host but then continues to the next play to see if that works.
If point 2) is true is there a setting to exit the whole playbook on this type or error?
Thanks,
Phill