How to call an action plugin/module embedded in a role?

I would like to embed some action plugins within a role, and then call those plugins from a top level playbook, after the role has been invoked/referenced.

AFAICT, I have followed these instructions http://docs.ansible.com/ansible/playbooks_roles.html#embedding-modules-and-plugins-in-roles , but when I attempt to call the action plugin from my playbook, it can’t find it, and gives:

ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

If I set my ANSIBLE_LIBRARY and ANSIBLE_ACTION_PLUGINS varaibles to reach into the role, then it works.

I’m running Ansible 2.2.2.0 on macOS Sierra, installed via pip.

Any ideas how to get this working?

action plugins require a corresponding module with same name to work
(even if just for documentation).

Yes, I have an associated module.

My action-plugin/module works perfectly fine when not embedded within a role, and when embedded in a role it also works if I set my ANSIBLE_LIBRARY and ANSIBLE_ACTION_PLUGINS to reach inside the role.

The documentation suggests that once the role has been accessed with a playbook, then embedded modules/plugins are then available, but that is not what I am seeing, and that is what I am asking about…

Just tested, works for me. Need more info to figure out why it does not for you.