Dependency to a role used in distinct hosts

28 views
Skip to first unread message

Paulo Sudério

unread,
May 9, 2016, 5:24:25 PM5/9/16
to Ansible Project
Hi all,

If I've understood correctly, role dependencies are to run in the same hosts. At least this seems to be the design. But I have many cases where dependencies are to roles that will run in other groups of hosts.

Ex.: roles to a group dbservers and roles to a group appservers - many of the roles of the appservers have the roles applied in the dbservers as dependencies.

What I would like is to define a dependency in a role that runs in a host / group, but this dependency must run in another host / group.

A simple reorganization of the playbook does not seem enough. Right now the best I was able to do is the reordering of dependencies in the playbooks, but this does not scale. The dependencies are too many and too entangled. Think hundreds microservices being deployed with database dependencies in many different hosts / groups, some with the same dependencies and some dependencies linked to more than one service.

Are there some best practices / planned feature to accomplish this?

Thanks,

Paulo Suderio
Reply all
Reply to author
Forward
0 new messages