I have a heterogenous set of hosts and a mix of different roles that I want to apply to each host. Using groups would mean creating a group for nearly every role, which felt like overkill.
This combination of a playbook and two task scripts runs the roles specified in the host's required_roles
variable, in order. It supports a tag named after the role, to run the specific role, and a tag role-partial
to activate the role but to require other tags to activate specific tasks in the role (helpful when debugging roles).