From a1ab093ddbd32f1002cbf6d6f184c7d0041d890d Mon Sep 17 00:00:00 2001 From: Med Date: Tue, 5 Nov 2019 16:34:18 +0100 Subject: [PATCH] synchronize - remove unused block (#64344) --- .../fragments/63954-synchronize-remove-unused-block.yml | 2 ++ lib/ansible/plugins/action/synchronize.py | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/63954-synchronize-remove-unused-block.yml diff --git a/changelogs/fragments/63954-synchronize-remove-unused-block.yml b/changelogs/fragments/63954-synchronize-remove-unused-block.yml new file mode 100644 index 00000000000..0c297d3058f --- /dev/null +++ b/changelogs/fragments/63954-synchronize-remove-unused-block.yml @@ -0,0 +1,2 @@ +bugfixes: +- synchronize - remove unused block (https://github.com/ansible/ansible/issues/63954) \ No newline at end of file diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index 0c0a89cbf0e..753315430d4 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -417,10 +417,4 @@ class ActionModule(ActionBase): # run the module and store the result result.update(self._execute_module('synchronize', module_args=_tmp_args, task_vars=task_vars)) - if 'SyntaxError' in result.get('exception', result.get('msg', '')): - # Emit a warning about using python3 because synchronize is - # somewhat unique in running on localhost - result['exception'] = result['msg'] - result['msg'] = ('SyntaxError parsing module. Perhaps invoking "python" on your local (or delegate_to) machine invokes python3. ' - 'You can set ansible_python_interpreter for localhost (or the delegate_to machine) to the location of python2 to fix this') return result