ansible-playbook crash when variable file contains accented characters

Hello,

I have a problem with Ansible 1.2.2 when a variable file contains accented characters.

Here is the error I have:

fatal: [192.241.148.29] => Traceback (most recent call last):
File “/home/pierre/.virtualenvs/ansel2_testing/local/lib/python2.7/site-packages/ansible/runner/init.py”, line 364, in _executor
exec_rc = self._executor_internal(host, new_stdin)
File “/home/pierre/.virtualenvs/ansel2_testing/local/lib/python2.7/site-packages/ansible/runner/init.py”, line 443, in _executor_internal
return self._executor_internal_inner(host, self.module_name, self.module_args, inject, port, complex_args=complex_args)
File “/home/pierre/.virtualenvs/ansel2_testing/local/lib/python2.7/site-packages/ansible/runner/init.py”, line 597, in _executor_internal_inner
result = handler.run(conn, tmp, module_name, module_args, inject, complex_args)
File “/home/pierre/.virtualenvs/ansel2_testing/local/lib/python2.7/site-packages/ansible/runner/action_plugins/normal.py”, line 54, in run
return self.runner._execute_module(conn, tmp, module_name, module_args, inject=inject, complex_args=complex_args)
File “/home/pierre/.virtualenvs/ansel2_testing/local/lib/python2.7/site-packages/ansible/runner/init.py”, line 282, in _execute_module
(remote_module_path, module_style, shebang) = self._copy_module(conn, tmp, module_name, args, inject, complex_args)
File “/home/pierre/.virtualenvs/ansel2_testing/local/lib/python2.7/site-packages/ansible/runner/init.py”, line 746, in _copy_module
encoded_args = repr(str(module_args))
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe9’ in position 11: ordinal not in range(128)

I believe I was not having this problem with Ansible 1.1.

If I remove the accented character, everything is fine (I am in the ASCII range).

Could you check? Thank you.

Thanks, does the same problem occur in 1.3 devel?

Can you share your variable file and how you are using it in the playbook?

Hello Michael,

I did a test with ‘devel’ and the bug is gone! So, is more information needed?

I think we are ok.

We are probably not going to do another dot release since 1.3 is slated for the end of the month, and lots of folks run from development head nearly full time.

  • = ordinarily this would be earlier, but I want to align ourselves back towards the end of the month again versus arbitrarily in the middle, and it seems right to get some more major features in core Ansible too.