Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode errors when running playbook with unicode under ansible 1.9.6 #16373

Closed
simfarm opened this issue Jun 20, 2016 · 2 comments
Closed

Unicode errors when running playbook with unicode under ansible 1.9.6 #16373

simfarm opened this issue Jun 20, 2016 · 2 comments
Assignees
Labels
bug This issue/PR relates to a bug.
Milestone

Comments

@simfarm
Copy link

simfarm commented Jun 20, 2016

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
[root@ip-10-65-202-196 _3120__ansible_playbooksgit_j]# ansible --version
ansible 1.9.6
  configured module search path = None
CONFIGURATION

All defaults.

OS / ENVIRONMENT

NA

SUMMARY

"UnicodeEncodeError" when running playbook with unicode.

STEPS TO REPRODUCE
  • Create this playbook, and call it utf-8-䉪ቒ칸ⱷꯔ噂폄蔆㪗輥.yml.
  • Use the following inventory file:
[local]
127.0.0.1 ansible_connection=local ansible_python_interpreter='/usr/bin/env python'
EXPECTED RESULTS

Successful playbook run.

ACTUAL RESULTS
[root@ip-10-65-202-196 _3120__ansible_playbooksgit_j]# ansible-playbook -i inventory utf-8.yml 
Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 324, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/bin/ansible-playbook", line 264, in main
    pb.run()
  File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 310, in run
    play = Play(self, play_ds, play_basedir, vault_password=self.vault_password)
  File "/usr/lib/python2.6/site-packages/ansible/playbook/play.py", line 194, in __init__
    self._tasks      = self._load_tasks(self._ds.get('tasks', []), load_vars)
  File "/usr/lib/python2.6/site-packages/ansible/playbook/play.py", line 606, in _load_tasks
    tokens = split_args(str(x['include']))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 65-74: ordinal not in range(128)
abadger added a commit to abadger/ansible that referenced this issue Jun 29, 2016
@abadger abadger added this to the stable-1.9 milestone Jun 29, 2016
@abadger
Copy link
Contributor

abadger commented Jun 29, 2016

Made a PR which should fix this on 1.9.x. Also tested devel and the problem is not present there.

@abadger
Copy link
Contributor

abadger commented Jun 30, 2016

Merged to stable-1.9. There are no plans for a 1.9.7 release but if one becomes necessary this fix will be in it.

@abadger abadger closed this as completed Jun 30, 2016
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants