# Windows lookup plugins

**URL:** <https://forum.ansible.com/t/windows-lookup-plugins/28481>\
**Category:** Ansible Developer\
**Tags:** windows\
**Created:** [August 31, 2018, 1:16pm UTC](https://forum.ansible.com/t/windows-lookup-plugins/28481 "2018-08-31T13:16:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aestrangwood](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@aestrangwood](https://forum.ansible.com/u/aestrangwood)\
**Post date:** [August 31, 2018, 1:16pm UTC](https://forum.ansible.com/t/windows-lookup-plugins/28481/1 "2018-08-31T13:16:58Z")

</div>

i want to create a lookup plugin for use on windows that does the same as the ini lookup but cant find any docs to say how its done or if its possible. I tried to make a plugin the same way i would a windows module but im greeted with the error  
`

“exception”: “Traceback (most recent call last):\n File "/usr/lib/python2.7/site-packages/ansible/executor/task\_executor.py", line 138, in run\n res = self.\_execute()\n File "/usr/lib/python2.7/site-packages/ansible/executor/task\_executor.py", line 509, in \_execute\n self.\_task.post\_validate(templar=templar)\n File "/usr/lib/python2.7/site-packages/ansible/playbook/task.py", line 260, in post\_validate\n super(Task, self).post\_validate(templar)\n File "/usr/lib/python2.7/site-packages/ansible/playbook/base.py", line 361, in post\_validate\n value = templar.template(getattr(self, name))\n File "/usr/lib/python2.7/site-packages/ansible/template/ **init**.py", line 523, in template\n disable\_lookups=disable\_lookups,\n File "/usr/lib/python2.7/site-packages/ansible/template/ **init**.py", line 479, in template\n disable\_lookups=disable\_lookups,\n File "/usr/lib/python2.7/site-packages/ansible/template/ **init**.py", line 722, in do\_template\n res = j2\_concat(rf)\n File "", line 8, in root\n File "/usr/lib/python2.7/site-packages/jinja2/runtime.py", line 196, in call\n return \_\_obj(\*args, \*\*kwargs)\n File "/usr/lib/python2.7/site-packages/ansible/template/ **init**.py", line 613, in \_lookup\n instance = self.\_lookup\_loader.get(name.lower(), loader=self.\_loader, templar=self)\n File "/usr/lib/python2.7/site-packages/ansible/plugins/loader.py", line 381, in get\n obj = getattr(self.\_module\_cache[path], self.class\_name)\nAttributeError: ‘module’ object has no attribute ‘LookupModule’\n”,

`

Can some one help me out please.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [August 31, 2018, 2:14pm UTC](https://forum.ansible.com/t/windows-lookup-plugins/28481/2 "2018-08-31T14:14:23Z")

</div>

Lookup plugins always run on the local ansible controller, not on the remote node, so a lookup plugin likely isn’t what you want.

You could fetch the file from the remote host, then use the ini lookup.
