# Creating ansible modules for windows

**URL:** <https://forum.ansible.com/t/creating-ansible-modules-for-windows/22054>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [July 20, 2016, 6:04am UTC](https://forum.ansible.com/t/creating-ansible-modules-for-windows/22054 "2016-07-20T06:04:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_Kumar](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@Deepak\_Kumar](https://forum.ansible.com/u/Deepak_Kumar)\
**Post date:** [July 20, 2016, 6:04am UTC](https://forum.ansible.com/t/creating-ansible-modules-for-windows/22054/1 "2016-07-20T06:04:02Z")

</div>

Hi,

I am trying to develop ansible modules for windows target machines. I don’t know how to import them in my playbooks. Should I need to edit the config file? Can anybody help me?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [July 21, 2016, 4:15pm UTC](https://forum.ansible.com/t/creating-ansible-modules-for-windows/22054/2 "2016-07-21T16:15:41Z")

</div>

You should just be able to put your custom modules in your /etc/ansible/library folder and they will become available to your playbooks.

I think you have to have a module\_name.ps1 and a module\_name.py in /etc/ansible/library (the .py file is just used for documentation, but I think ansible might expect it.

Also I think module names need to be unque, so make sure your module doesn’t have the same file name as an existing module (unless you want your custom module to be used instead of the supplied module - modules in /etc/ansible/library are used if present.

Hope this helps.

Jon

---

<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:** [July 21, 2016, 6:44pm UTC](https://forum.ansible.com/t/creating-ansible-modules-for-windows/22054/3 "2016-07-21T18:44:42Z")

</div>

You can also place them in a directory named library/ next to your playbooks- this is usually the way I tell people to do it, so your modules can be versioned alongside your content.

The .py doc file is not required anymore (it was at one point), but strongly encouraged so that ansible-doc will work for your modules the same way as for “in the box” modules.
