20 lines
652 B
Django/Jinja
20 lines
652 B
Django/Jinja
{% for role in topology_map %}
|
|
{% set role_count = topology_map[role].scale |default(0) %}
|
|
{% set role_profile = topology_map[role].flavor |default('') %}
|
|
{% set role_networks = topology_map[role].networks |default([]) %}
|
|
{% if role_count %}
|
|
- name: {{ role }}
|
|
count: {{ role_count }}
|
|
{% if role_profile or (role_networks and network_isolation and network_provision|bool) %}
|
|
defaults:
|
|
{% endif %}
|
|
{% if role_profile %}
|
|
profile: {{ role_profile }}
|
|
{% endif %}
|
|
{% if role_networks and network_isolation and network_provision|bool %}
|
|
networks:
|
|
{{ role_networks | to_nice_yaml(indent=2) | indent(6)}}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|