Hi Guys,
I want to include another playbook in my playbook.
Ansible allows to do this by using “include_role” like so:
- include_role:
name:
task_from:
While this is a simple and working solution I want to offer a shorter syntax like so:
- :
This would then internally call role:task-file, but hidden to the playbook writer, giving a cleaner syntax.
The proper way to achieve this seems to be writing an action plugin named “.py”.
This plugin then in turn calls the playbook, possibly by internally calling include_role.
My question is:
Can someone show how to call “include_role” from inside an action plugin?
I have tried but so far without success. (I was however able to call other modules)
I am using Ansible 2.0+