# Args for Custom Module

**URL:** <https://forum.ansible.com/t/args-for-custom-module/12812>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [May 16, 2013, 1:00pm UTC](https://forum.ansible.com/t/args-for-custom-module/12812 "2013-05-16T13:00:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [May 16, 2013, 1:00pm UTC](https://forum.ansible.com/t/args-for-custom-module/12812/1 "2013-05-16T13:00:15Z")

</div>

​Set the optional item to an empty string?​

> with\_items:  
> &nbsp;&nbsp;&nbsp;&nbsp;- name: name1  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;other: value1  
> &nbsp;&nbsp;&nbsp;&nbsp;- name: name2

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;other: ​​

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 16, 2013, 1:26pm UTC](https://forum.ansible.com/t/args-for-custom-module/12812/2 "2013-05-16T13:26:25Z")

</div>

This idiom looks like a mess to me.

I’d break this into two calls and not pass it for the other case.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 16, 2013, 3:23pm UTC](https://forum.ansible.com/t/args-for-custom-module/12812/3 "2013-05-16T15:23:24Z")

</div>

Or yes, empty string, empty string would be great.

sorry, ENOCAFFEINE this AM 🙂

---

<div class="post-metadata">

**Author:** ![BFMartin](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@BFMartin](https://forum.ansible.com/u/BFMartin)\
**Post date:** [May 16, 2013, 9:49pm UTC](https://forum.ansible.com/t/args-for-custom-module/12812/4 "2013-05-16T21:49:54Z")

</div>

Supplying an “empty string” seems messy to me where the playbook a bit messy with an extra arg.

Instead of being an optional arg, it is now a required arg that needs an empty value.
