action plugin vs module

413 views
Skip to first unread message

cdar z

unread,
Nov 6, 2014, 5:34:07 AM11/6/14
to ansible...@googlegroups.com
Could You help and tell me the difference between an action plugin and a module? Why is an action plugin 'synchronize' and a module 'synchronize' at the same time? Thanks.

J Hawkesworth

unread,
Nov 6, 2014, 11:11:24 AM11/6/14
to ansible...@googlegroups.com
See 

http://docs.ansible.com/intro_configuration.html#action-plugins

In essence, action plugins provide services to modules and are used for various things including the abilty to let different modules share logic.  Modules provide a mechanism with a defined interface.  For example the ability to copy files to a remote machine is a useful capability for lots of modules (template, unarchive), so the action plugins let other modules use the logic in the copy module.

cdar z

unread,
Nov 6, 2014, 11:31:13 AM11/6/14
to ansible...@googlegroups.com
So if I'm understanding it right, synchronize module should invoke synchronize action plugin to meet DRY principle.

module synchronize.py
action_plugin synchronize.py

Michael DeHaan

unread,
Nov 7, 2014, 9:20:32 AM11/7/14
to ansible...@googlegroups.com

Action plugins call modules of the same name sometimes, not the other way around.

This has nothing to do with "Don't Repeat Yourself".



--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4b082809-52bf-4415-a2f3-384c76b92e31%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages