The short answer:
- Use modules to execute the action on the target machine. Example ‘yum’ to install packages.
- Choose an action plugin when all or part of the work should take place on the controller, the action plugin can then also call a module to finish off the work on the remote target. Example ‘template’, the templating happens on controller and the file copy is to the target, this last step is pretty complex as it is calling the copy action plugin which can call the stat, copy and file modules.