mirror of
https://github.com/mother-of-all-self-hosting/mash-playbook
synced 2024-11-10 06:14:17 +00:00
Make bin/optimize.py choke early on incomplete role definitions
This provides better error messages. Related to6bc5602607
and3b432c11d3
This commit is contained in:
parent
a3828afc53
commit
5ec99feb72
1 changed files with 2 additions and 0 deletions
|
@ -146,6 +146,8 @@ all_role_definitions = load_yaml_file(args.src_requirements_yml_path)
|
|||
|
||||
enabled_role_definitions = []
|
||||
for role_definition in all_role_definitions:
|
||||
if 'name' not in role_definition:
|
||||
raise Exception('Role definition does not have a name and should be adjusted to have one: {0}'.format(role_definition))
|
||||
if is_role_definition_in_use(role_definition, used_variable_names):
|
||||
enabled_role_definitions.append(role_definition)
|
||||
|
||||
|
|
Loading…
Reference in a new issue