mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
When operating on a unicode string in python 2.6, shlex.split returns
a result that does not work with the file constructor.
To reproduce this requires a task include that is templated (this is
because the templated string is a unicode result, whereas a non-
templated string is a non-unicode string)
[will@centos6.3] $ python
Python 2.6.6 (r266:84292, Sep 11 2012, 08:34:23)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import shlex
>>> shlex.split(u'abc')
['a\x00\x00\x00b\x00\x00\x00c\x00\x00\x00']
[will@fedora17] $ python
Python 2.7.3 (default, Jul 24 2012, 10:05:38)
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import shlex
>>> shlex.split(u'abc')
['abc']
The proposed fix (coercing the include parameters to string before the
shlex.split) may not be ideal but it does fix the bug for my test case.
|
13 years ago | |
|---|---|---|
| .. | ||
| assemble.d | 14 years ago | |
| inventory_dir | 13 years ago | |
| test_playbook_vars | 14 years ago | |
| CentOS.yml | 14 years ago | |
| TestConstants.py | 13 years ago | |
| TestFilters.py | 13 years ago | |
| TestInventory.py | 13 years ago | |
| TestPlayBook.py | 13 years ago | |
| TestRunner.py | 13 years ago | |
| TestUtils.py | 13 years ago | |
| ansible.cfg | 13 years ago | |
| ansible_hosts | 14 years ago | |
| apt_key.gpg | 13 years ago | |
| common_vars.yml | 14 years ago | |
| complex_hosts | 13 years ago | |
| cron_test.yml | 13 years ago | |
| default_os.yml | 14 years ago | |
| hosts_list.yml | 13 years ago | |
| inventory_api.py | 13 years ago | |
| jinja2_overrides.tpl | 13 years ago | |
| large_range | 13 years ago | |
| lookup_plugins.yml | 13 years ago | |
| playbook-included.yml | 13 years ago | |
| playbook-includer.yml | 13 years ago | |
| playbook1.yml | 13 years ago | |
| results_list.yml | 13 years ago | |
| rocannon.txt | 13 years ago | |
| sample.j2 | 13 years ago | |
| simple_hosts | 13 years ago | |
| task-included.yml | 13 years ago | |
| task-includer.yml | 13 years ago | |
| template-basic | 14 years ago | |
| template-whitespace | 14 years ago | |
| world | 13 years ago | |