I managed to install the release 2.3.2.0 with virtualenv on my pc, easier than expected...
@kai
I confirm that the variable vars is defined and it works as described at least on my host.
I think I tested it in a wrong way (maybe trying to access vars[inventory_hostname][item|basename], but I'm not sure..), I'll double check on Monday
By the way I didn't find the variable description in the documentation pages.
@Adam E
I also tried to use the lookup plugin vars with ansible 2.3.2
I copied the plugin code /usr/lib/python2.7/dist-packages/ansible/plugins/lookup/vars.py in a test directory test/lookup_plugins/vars.py
I regenarate the bytecode (useless)
(v2.3.2) $ python -m py_compile vars.py
and tested it getting the following failure:
task path: /home/fusillator/Code/ansible/test/role.yml:8
The full traceback is:
Traceback (most recent call last):
File "/home/fusillator/Code/ansible/v2.3.2/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 89, in run
items = self._get_loop_items()
File "/home/fusillator/Code/ansible/v2.3.2/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 214, in _get_loop_items
items = mylookup.run(terms=loop_terms, variables=self._job_vars, wantlist=True)
File "/home/fusillator/Code/ansible/test/lookup_plugins/vars.py", line 72, in run
self.set_options(direct=kwargs)
AttributeError: 'LookupModule' object has no attribute 'set_options'
I think the code is not backward compatible with 2.3.2, and I'm a python newbe (not enough devotee) to further investigate on the issue.
thanks a lot for the support guys. You rock.