# How to write Ansible modules

**URL:** <https://forum.ansible.com/t/how-to-write-ansible-modules/21742>\
**Category:** Ansible Developer\
**Created:** [June 11, 2016, 2:52pm UTC](https://forum.ansible.com/t/how-to-write-ansible-modules/21742 "2016-06-11T14:52:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Maglana](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Mark\_Maglana](https://forum.ansible.com/u/Mark_Maglana)\
**Post date:** [June 11, 2016, 2:52pm UTC](https://forum.ansible.com/t/how-to-write-ansible-modules/21742/1 "2016-06-11T14:52:24Z")

</div>

I'd like to share my notes on writing modules:

[http://www.relaxdiego.com/2016/06/writing-ansible-modules-with-tests.html](http://www.relaxdiego.com/2016/06/writing-ansible-modules-with-tests.html)

Hoping to get some feedback on it.

---

<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:** [June 13, 2016, 10:47pm UTC](https://forum.ansible.com/t/how-to-write-ansible-modules/21742/2 "2016-06-13T22:47:11Z")

</div>

This is nice, I’d been wondering how to turn on travis on my fork for one thing.  
I skimmed it a little, but two things it would be nice to add

running the integration tests (abd writing them, although that’s mostly just writing playbooks)  
making the docs (especially webdocs) so you can see how your documentation will render.

Jon

---

<div class="post-metadata">

**Author:** ![Mark\_Maglana](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Mark\_Maglana](https://forum.ansible.com/u/Mark_Maglana)\
**Post date:** [June 15, 2016, 9:39pm UTC](https://forum.ansible.com/t/how-to-write-ansible-modules/21742/3 "2016-06-15T21:39:59Z")

</div>

Thanks for the feedback, Jon! Those items are worthy of their own articles. I’ll work on those next week unless somebody beats me to the punch! 🙂

Regards,

Mark

---

<div class="post-metadata">

**Author:** ![K\_Krishna](https://avatars.discourse-cdn.com/v4/letter/k/4af34b/32.png) [@K\_Krishna](https://forum.ansible.com/u/K_Krishna)\
**Post date:** [June 17, 2016, 3:45pm UTC](https://forum.ansible.com/t/how-to-write-ansible-modules/21742/4 "2016-06-17T15:45:48Z")

</div>

Very useful. I’ll use it as Iam getting started.

---

<div class="post-metadata">

**Author:** ![Mark\_Maglana](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Mark\_Maglana](https://forum.ansible.com/u/Mark_Maglana)\
**Post date:** [June 17, 2016, 5:44pm UTC](https://forum.ansible.com/t/how-to-write-ansible-modules/21742/5 "2016-06-17T17:44:48Z")

</div>

Hi Krishna,

FYI I’ll be pushing a tiny update to that article soon. Ansible uses nose instead of pytest so I will modify the testing part to use the former.

---

<div class="post-metadata">

**Author:** ![Vijayakumar\_Ramdoss](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@Vijayakumar\_Ramdoss](https://forum.ansible.com/u/Vijayakumar_Ramdoss)\
**Post date:** [July 22, 2016, 1:25pm UTC](https://forum.ansible.com/t/how-to-write-ansible-modules/21742/6 "2016-07-22T13:25:08Z")

</div>

Excellent document,
