confab.resolve

Resolve environment, role, and host choices into actions.

If a user specifies only an environment, confab should target all hosts and roles in that environment. If one or more roles – or one or more hosts – are specified explicilty, confab should target a subset.

confab.resolve.resolve_hosts_and_roles(environment, hosts=None, roles=None)[source]

Given an environment, (possibly empty) list of hosts, and a (possibly empty) list of roles, return a mapping from host to roles to target.

Raises an exception if any targeted host would have no roles after resolution.