Import remote common playbook while running Ansible

Hi all,

Does anyone know if there is a way to check out a common playbook and import that as if that is local playbooks and run it ?

I have a playbook that installs and configures a component that has the concept of manager and agents. And there are some tasks that needed to be run on all nodes, some on only the manager node, and some on the agent nodes. This needs to be repeated for each apps env we build for. This file is called at the end of the main.yml ( #include component.yml) for app set up.

Currently, I find myself copying that component.yml in each app.

I am hoping to be able to have a way to check out the component.yml from git while kicking off ansible playbook and include that in main.yml instead of having to copy them repeatedly.

Is that doable?

Thank you.

Xavier