diff options
Diffstat (limited to 'lib/ansible/plugins/action/fetch.py')
-rw-r--r-- | lib/ansible/plugins/action/fetch.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ansible/plugins/action/fetch.py b/lib/ansible/plugins/action/fetch.py index 992ba5a5..11c91eb2 100644 --- a/lib/ansible/plugins/action/fetch.py +++ b/lib/ansible/plugins/action/fetch.py @@ -19,7 +19,7 @@ __metaclass__ = type import os import base64 -from ansible.errors import AnsibleError, AnsibleActionFail, AnsibleActionSkip +from ansible.errors import AnsibleConnectionFailure, AnsibleError, AnsibleActionFail, AnsibleActionSkip from ansible.module_utils.common.text.converters import to_bytes, to_text from ansible.module_utils.six import string_types from ansible.module_utils.parsing.convert_bool import boolean @@ -75,6 +75,8 @@ class ActionModule(ActionBase): # Follow symlinks because fetch always follows symlinks try: remote_stat = self._execute_remote_stat(source, all_vars=task_vars, follow=True) + except AnsibleConnectionFailure: + raise except AnsibleError as ae: result['changed'] = False result['file'] = source |