Merge pull request #13968 from ansible/synchronize-become-is-reversed

synchronize: First cut at not doing sudo on the control machine but on the remote machine instead.
This commit is contained in:
Toshio Kuratomi 2016-01-25 19:52:03 -08:00
commit a23a5d1b93
2 changed files with 55 additions and 19 deletions

View file

@ -1788,7 +1788,9 @@ class AnsibleModule(object):
elif isinstance(args, basestring) and use_unsafe_shell:
shell = True
elif isinstance(args, basestring):
args = shlex.split(args.encode('utf-8'))
if isinstance(args, unicode):
args = args.encode('utf-8')
args = shlex.split(args)
else:
msg = "Argument 'args' to run_command must be list or string"
self.fail_json(rc=257, cmd=args, msg=msg)