mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Enable UTF-8 commands via the raw module
Paramiko does not allow Unicode strings as parameters, so encode the command to UTF-8. Test case: ansible localhost -m raw -a 'echo ą' (also tested on local and ssh transports without problems)
This commit is contained in:
parent
2aef0335cb
commit
73b0dd4ac0
1 changed files with 1 additions and 1 deletions
|
@ -212,7 +212,7 @@ class Runner(object):
|
|||
def _execute_raw(self, conn, tmp, inject=None):
|
||||
''' execute a non-module command for bootstrapping, or if there's no python on a device '''
|
||||
return ReturnData(conn=conn, result=dict(
|
||||
stdout=self._low_level_exec_command(conn, self.module_args, tmp, sudoable = True)
|
||||
stdout=self._low_level_exec_command(conn, self.module_args.encode('utf-8'), tmp, sudoable = True)
|
||||
))
|
||||
|
||||
# ***************************************************
|
||||
|
|
Loading…
Reference in a new issue