action plugin vs module

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.

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.

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

W dniu czwartek, 6 listopada 2014 17:11:24 UTC+1 użytkownik J Hawkesworth napisał:

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

This has nothing to do with “Don’t Repeat Yourself”.