Description of problem: Tried to run a ping across my inventory. Added a password with double quotes in it, which seems to be the cause of the crash. Version-Release number of selected component: ansible-1.9.3-2.fc22 Additional info: reporter: libreport-2.6.2 cmdline: /usr/bin/python /usr/bin/ansible community -i ./hosts-independent -m ping dso_list: python-libs-2.7.10-8.fc22.x86_64 executable: /usr/bin/ansible kernel: 4.1.10-200.fc22.x86_64 runlevel: N 5 type: Python uid: 1810 Truncated backtrace: shlex.py:172:read_token:ValueError: No closing quotation Traceback (most recent call last): File "/usr/bin/ansible", line 197, in <module> (runner, results) = cli.run(options, args) File "/usr/bin/ansible", line 121, in run inventory_manager = inventory.Inventory(options.inventory, vault_password=vault_pass) File "/usr/lib/python2.7/site-packages/ansible/inventory/__init__.py", line 128, in __init__ self.parser = InventoryParser(filename=host_list) File "/usr/lib/python2.7/site-packages/ansible/inventory/ini.py", line 43, in __init__ self._parse() File "/usr/lib/python2.7/site-packages/ansible/inventory/ini.py", line 47, in _parse self._parse_base_groups() File "/usr/lib/python2.7/site-packages/ansible/inventory/ini.py", line 108, in _parse_base_groups tokens = shlex.split(line) File "/usr/lib64/python2.7/shlex.py", line 279, in split return list(lex) File "/usr/lib64/python2.7/shlex.py", line 269, in next token = self.get_token() File "/usr/lib64/python2.7/shlex.py", line 96, in get_token raw = self.read_token() File "/usr/lib64/python2.7/shlex.py", line 172, in read_token raise ValueError, "No closing quotation" ValueError: No closing quotation Local variables in innermost frame: self: <shlex.shlex instance at 0x7f0cf6a6bdd0> nextchar: '' quoted: True escapedstate: ' '
Created attachment 1084874 [details] File: backtrace
Created attachment 1084875 [details] File: environ
Added where? as a vault password? as a variable? If you escape it with \ does it work?
Sorry for the delay, I haven't had the time to respond and I had already fixed the problem variable. In this case it was in an ansible_ssh_pass= variable in an inventory file. Example: foo.bar.com ansible_ssh_pass="N#qd3e'$" Yes, using an escape works, but receiving a traceback and abrt message is not good.
Agreed. Would you be willing to file an upstream issue on this? Or shall I?
Ansible 2.x seems to have fixed this. Closing.