# module defaults

**URL:** <https://forum.ansible.com/t/module-defaults/12393>\
**Category:** Ansible Project\
**Created:** [February 20, 2013, 11:36pm UTC](https://forum.ansible.com/t/module-defaults/12393 "2013-02-20T23:36:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Devin\_Bayer](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@Devin\_Bayer](https://forum.ansible.com/u/Devin_Bayer)\
**Post date:** [February 20, 2013, 11:36pm UTC](https://forum.ansible.com/t/module-defaults/12393/1 "2013-02-20T23:36:26Z")

</div>

Hi. I plan to write a new easy\_install module and am thinking about how to handle arguments that should be set globally, for example the virtualenv dir and repo index. Currently I use a task to set the defaults, but that doesn’t seem to work with notify and calling it becomes a lot more verbose:

tasks:

- pip: name=ipython # easy
- include: tasks/custom-pip.yml state=present name=ipython # hard

What I really want is a subclass of a module, maybe defined in yaml to make it easier. So I’ve created this action\_plugin that allows wrapper modules to be written in yaml:

[http://pastebin.com/N0QcZsM1](http://pastebin.com/N0QcZsM1)

Is there any interest in this being included in core?

---

<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:** [February 21, 2013, 4:10am UTC](https://forum.ansible.com/t/module-defaults/12393/2 "2013-02-21T04:10:33Z")

</div>

No such way to do this now. Somewhat intentional. Typically you  
would set it one place and just use with\_items to prevent repeating  
yourself.

---

<div class="post-metadata">

**Author:** ![Devin\_Bayer1](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@Devin\_Bayer1](https://forum.ansible.com/u/Devin_Bayer1)\
**Post date:** [February 21, 2013, 8:32am UTC](https://forum.ansible.com/t/module-defaults/12393/3 "2013-02-21T08:32:07Z")

</div>


