module defaults

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

Is there any interest in this being included in core?

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.