The plugin has been written by
# (c) 2013, Serge van Ginderachter <serge@xxxx>
#
# This file is part of Ansible
It begins like this:
import ansible.utils as utils
import ansible.errors as errors
class LookupModule(object):
def __init__(self, basedir=None, **kwargs):
self.basedir = basedir
def run(self, terms, inject=None, **kwargs):
terms = utils.listify_lookup_plugin_terms(terms, self.basedir,
inject)
terms[0] = utils.listify_lookup_plugin_terms(terms[0],
self.basedir, inject)
When running it in ansible 1.7, things work as expected.
While running it in ansbile 2.1,
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File
"/work/github/berkin/ansible-2.0/lib/ansible/executor/task_executor.py",
line 91, in run
items = self._get_loop_items()
File
"/work/github/berkin/ansible-2.0/lib/ansible/executor/task_executor.py",
line 191, in _get_loop_items
items = self._shared_loader_obj.lookup_loader.get(self._task.loop,
loader=self._loader, templar=templar).run(terms=loop_terms,
variables=self._job_vars)
AttributeError: 'NoneType' object has no attribute 'run'
fatal: [devtest]: FAILED! => {"failed": true, "msg": "Unexpected failure
during module execution.", "stdout": ""}
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c95f07cc-f7f6-41cb-99bc-0b2aee55e345%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.