Ansible plugins, as we mentioned earlier, represent actions that are executed on the master (control server) instead of the target host. These plugins allow us to add additional functionality to the Ansible solution easily. Once the plugin has been written, the action is then available to be called via a traditional YAML playbook action. Before we start coding our action plugin, let's take a look at how to set up the development environment.
Similar to the modules' development environment, action plugins must reside either in ./<type of plugin>_plugins next to the playbook being executed or within one of the specified folders. For example, you might have a directory structure like the following:
#> foo.yml
#> action_plugins/
#> action_plugin/mymodule.py
Or, you may have this:
#> foo.yml
#> callback_plugins...