Sorry if that's been already been discussed...
It's currently possible to include modules under <rolename>/library and,
surprisingly, it's not possible to do the same with plugins, i.e. to put
them into the respective directories:
<rolename>/action_plugins
<rolename>/lookup_plugins
<rolename>/callback_plugins
<rolename>/connection_plugins
<rolename>/filter_plugins
<rolename>/vars_plugins
I'm ready to send a pull request that enables this behaviour.
Rationale:
1. Roles sometimes require additional Jinja filters, etc.
2. Manual installation of the plugins to the respective subdirectories
relative to the playbook or even system-wide plugin directories is
cumbersome. It causes a lot of management burden and it defeats the
grand idea of easily distributable and reusable roles. Ansible Galaxy
and automatic role installation is broken.
3. One can argue that we could just submit new plugins to the core but
those:
- might not be admitted fast enough - devs have a lot of work
- should not be ever submitted - as they make little or no
sense for any other role and will simply clutter up the core
4. And finally <rolename>/library is already allowed, possibly due to
the similar reasons.
What are your opinions?