Make run_command() work when we get byte str with non-ascii characters (instead of unicode type like we were expecting)

Fix and test.

Fixes #10536
This commit is contained in:
Toshio Kuratomi 2015-03-25 12:22:45 -07:00
commit aaa25eb75c
2 changed files with 15 additions and 1 deletions

View file

@ -41,6 +41,15 @@
- name: 'A task with unicode host vars'
debug: var=unicode_host_var
- name: 'A task with unicode shell parameters'
shell: echo '¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö ×'
register: output
- name: 'Assert that the unicode was echoed'
assert:
that:
- "'¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö ×' in output.stdout_lines"
- name: 'A play for hosts in group: ĪīĬĭ'
hosts: 'ĪīĬĭ'
gather_facts: true