Not sure whether it is possible, but let me raise the question, it is possible to import/include a single task for one play book to another play book rather than importing the entire play book.e.g
I was able to find the solution as this was stated in the ansible documentation
And import/include statements:
- import_tasks: foo.yml
tags: [web,foo]
or:
- include_tasks: foo.yml
tags: [web,foo]
All of these apply the specified tags to EACH task inside the play, included file, or role, so that these tasks can be selectively run when the playbook is invoked with the corresponding tags.
import_X applies the tags to the imported tasks, include_X has the
tags applied to itself, but not to the included tasks (we plan update
with feature to allow for this).