mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
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:
commit
a23a5d1b93
2 changed files with 55 additions and 19 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue