diff options
Diffstat (limited to 'test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py')
-rw-r--r-- | test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py b/test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py new file mode 100644 index 0000000..0d8c385 --- /dev/null +++ b/test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py @@ -0,0 +1,14 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import ansible.plugins.connection.local as ansible_local +from ansible.errors import AnsibleConnectionFailure + +from ansible.utils.display import Display +display = Display() + + +class Connection(ansible_local.Connection): + def exec_command(self, cmd, in_data=None, sudoable=True): + display.debug('Intercepted call to exec remote command') + raise AnsibleConnectionFailure('BADLOCAL Error: this is supposed to fail') |