diff options
Diffstat (limited to 'overcloud.j2.yaml')
-rw-r--r-- | overcloud.j2.yaml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/overcloud.j2.yaml b/overcloud.j2.yaml index a322a445..35cf7da8 100644 --- a/overcloud.j2.yaml +++ b/overcloud.j2.yaml @@ -1,4 +1,12 @@ -{% set primary_role_name = roles[0].name -%} +{%- set primary_role = [roles[0]] -%} +{%- for role in roles -%} + {%- if 'primary' in role.tags and 'controller' in role.tags -%} + {%- set _ = primary_role.pop() -%} + {%- set _ = primary_role.append(role) -%} + {%- endif -%} +{%- endfor -%} +{%- set primary_role_name = primary_role[0].name -%} +# primary role is: {{primary_role_name}} heat_template_version: ocata description: > |