Taking a step back, what problem are you trying to solve? Depending on what you are trying to do, you might be able to solve the problem using the existing modules working together in a (re-usable) role.
Jon On Thursday, January 21, 2016 at 11:00:35 PM UTC, Mike Biancaniello wrote: > > So, what's the deal with action_plugins? There is very little > documentation on their purpose. > > Observations: > 1. If action_plugin/foo.py and library/foo.py both exist, then only > action_plugin/foo.py gets called (the plugin *may* call the module if it > wants, but that is not by default). > 2. If library/foo.py exists, but there is no corresponding action_plugin, > the library is called. > 3. If action_plugin/foo.py exists, but there is no corresponding module, > then Ansible throws a syntax error. > 4. If action_plugin/foo.py exists, and the library is empty (literally > created with 'touch library/foo.py'), then the action_plugin is called and > everything works. > 5. *some*times, but no always, the action_plugin does some preliminary > work with data that is not available to the library or the option plugin > modifies the results. > > For #5, I can understand a solid use case. If a vendor supplies a module > and you want to use it, but would prefer to have the data returned > differently (or strip out data or whatever) but don't want to modify the > vendor's module, then this makes a lot of sense as a module wrapper. > > I need to write a module and can't decide if I should write a standard > library module or if I should write an action_plugin with a blank library > module (I suppose just to use for documentation, though that seems odd). > > any clarification would help. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4b4442a0-7517-4341-85c0-806e29608a1a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
