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