diff options
author | Toshio Kuratomi <toshio@fedoraproject.org> | 2015-08-03 14:43:27 -0700 |
---|---|---|
committer | Toshio Kuratomi <toshio@fedoraproject.org> | 2015-08-03 15:05:26 -0700 |
commit | f86245dcb07eb1a8202722daf51eb7d85e0b103b (patch) | |
tree | f8015a33e91fa1087526333c0d81843af6e81262 | |
parent | cedc8416df0e60b6cdf50f1a97d375017dd8e2e7 (diff) | |
download | ansible-f86245dcb07eb1a8202722daf51eb7d85e0b103b.tar.gz |
Add a warning about python3 in the synchronize plugin
-rw-r--r-- | lib/ansible/plugins/action/synchronize.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index 1870f2b215..e840e412c5 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -217,4 +217,9 @@ class ActionModule(ActionBase): # run the module and store the result result = self._execute_module('synchronize', task_vars=task_vars) + if 'SyntaxError' in result['msg']: + # Emit a warning about using python3 because synchronize is + # somewhat unique in running on localhost + result['traceback'] = 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 |