tripleo-quickstart-extras/roles/overcloud-deploy/templates/overcloud_baremetal_deploy.yaml.j2
Takashi Kajinami 4a4bd9c06a overcloud: Remove logic for unsupported old releases
This change removes logic for releases older than train, because these
releases are already EOLed. This covers only overcloud-* roles and
playbooks and the other items will be covered by separate changes.

Note that this change also removes the containerized_* variables
because current active releases(>=Train) no longer supports
non-containerized deployment. The containerized_overcloud_upgrade
variable is still left because the variable is still required by
the tripleo-ci-base-multinode-standard job template.

Change-Id: If29ec2c2219a28a1f79db0e552e2c622c0a7bda6
2022-10-25 16:32:53 +09:00

59 lines
2.6 KiB
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([]) %}
{% set network_config = topology_map[role].network_config |default('') %}
{% set growvols_args = topology_map[role].growvols_args |default('') %}
{% if role_count %}
- name: {{ role }}
count: {{ role_count }}
{% if 'Controller' in role %}
{# (jbadiapa) The to_json | from_json is due to the ansible issue at #}
{# https://github.com/ansible/ansible/issues/27299 #}
{% if ( baremetal_instackenv | to_json | from_json | json_query("nodes[?contains(capabilities, 'profile:control')].name")| length > 0 ) %}
instances:
{% for instance in range (role_count): %}
- hostname: {{stack_name}}-{{role|lower}}-{{instance}}
name: {{ (baremetal_instackenv | to_json | from_json | json_query("nodes[?contains(capabilities, 'profile:control')].name"))[instance] }}
{% endfor %}
{% endif %}
{% elif 'Compute' in role %}
{% if (baremetal_instackenv | to_json | from_json | json_query("nodes[?contains(capabilities, 'profile:compute')].name")| length > 0 ) %}
instances:
{% for instance in range (role_count): %}
- hostname: {{stack_name}}-{{role|lower}}-{{instance}}
name: {{ (baremetal_instackenv | to_json | from_json | json_query("nodes[?contains(capabilities, 'profile:compute')].name"))[instance] }}
{% endfor %}
{% endif %}
{% elif 'Ceph' in role %}
{% if ( baremetal_instackenv | to_json | from_json | json_query("nodes[?contains(capabilities, 'profile:ceph')].name")| length > 0 ) %}
instances:
{% for instance in range (role_count): %}
- hostname: {{stack_name}}-{{role|lower}}-{{instance}}
name: {{ (baremetal_instackenv | to_json | from_json | json_query("nodes[?contains(capabilities, 'profile:ceph')].name"))[instance] }}
{% endfor %}
{% endif %}
{% endif %}
{% if role_profile or (network_config and network_provision|bool) 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 %}
{% if network_config and network_provision|bool %}
network_config:
{{ network_config | to_nice_yaml(indent=2) | indent(6)}}
{% endif %}
{% if growvols_args and release not in ['train'] %}
ansible_playbooks:
- playbook: /usr/share/ansible/tripleo-playbooks/cli-overcloud-node-growvols.yaml
extra_vars:
growvols_args: {{ growvols_args }}
{% endif %}
{% endif %}
{% endfor %}