# Extend setup module

**URL:** <https://forum.ansible.com/t/extend-setup-module/22531>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [September 13, 2016, 9:14am UTC](https://forum.ansible.com/t/extend-setup-module/22531 "2016-09-13T09:14:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Fennemore](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mike\_Fennemore](https://forum.ansible.com/u/Mike_Fennemore)\
**Post date:** [September 13, 2016, 9:14am UTC](https://forum.ansible.com/t/extend-setup-module/22531/1 "2016-09-13T09:14:40Z")

</div>

We have a internal CMDB that gathers facts from systems using the setup module on playbook execution. Is there a way to extend the setup module to include extra information?  
From what I have read the local facts would work for Linux systems but the path wouldn’t exist on Windows systems.

---

<div class="post-metadata">

**Author:** ![Mike\_Fennemore](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mike\_Fennemore](https://forum.ansible.com/u/Mike_Fennemore)\
**Post date:** [September 13, 2016, 10:54am UTC](https://forum.ansible.com/t/extend-setup-module/22531/2 "2016-09-13T10:54:35Z")

</div>

Nevermind, to answer my own question [http://docs.ansible.com/ansible/developing\_modules.html#module-provided-facts](http://docs.ansible.com/ansible/developing_modules.html#module-provided-facts) . Although this does add the hassle of adding a custom module to playbooks.  
It would be nice to have a hook to add a module to run on playbook execution like the setup module though.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [September 13, 2016, 1:34pm UTC](https://forum.ansible.com/t/extend-setup-module/22531/3 "2016-09-13T13:34:52Z")

</div>

You might want to weigh in on this proposal [https://github.com/ansible/proposals/issues/17](https://github.com/ansible/proposals/issues/17)

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [September 15, 2016, 3:18pm UTC](https://forum.ansible.com/t/extend-setup-module/22531/4 "2016-09-15T15:18:13Z")

</div>

Local facts for Windows have been available since 2.1- you just need to set fact\_path to tell it where on the target system to find a directory of .ps1 scripts to execute. It currently expects to find a dictionary/array on the output pipeline from each script that gets grafted onto a new fact named ansible\_(factsfilename-sans-extension).
