diff --git a/roles/ci_dcn_site/templates/network-values/values.yaml.j2 b/roles/ci_dcn_site/templates/network-values/values.yaml.j2 index 2c16ac3ed1..6c9fd530e0 100644 --- a/roles/ci_dcn_site/templates/network-values/values.yaml.j2 +++ b/roles/ci_dcn_site/templates/network-values/values.yaml.j2 @@ -3,8 +3,10 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% for network in cifmw_networking_env_definition.instances[host]['networks'].values() -%} {% set ns.interfaces = ns.interfaces | combine({network.network_name: (network.parent_interface | diff --git a/roles/ci_gen_kustomize_values/templates/bgp-l3-xl/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/bgp-l3-xl/network-values/values.yaml.j2 index abd5bce805..9bbcd959ea 100644 --- a/roles/ci_gen_kustomize_values/templates/bgp-l3-xl/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/bgp-l3-xl/network-values/values.yaml.j2 @@ -3,8 +3,12 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} + +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% set hostname = cifmw_networking_env_definition.instances[host]['hostname'] %} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: diff --git a/roles/ci_gen_kustomize_values/templates/bgp_dt01/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/bgp_dt01/network-values/values.yaml.j2 index 37efadd534..9f326d6163 100644 --- a/roles/ci_gen_kustomize_values/templates/bgp_dt01/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/bgp_dt01/network-values/values.yaml.j2 @@ -3,8 +3,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% set hostname = cifmw_networking_env_definition.instances[host]['hostname'] %} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: diff --git a/roles/ci_gen_kustomize_values/templates/bmo01/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/bmo01/network-values/values.yaml.j2 index 44a236a8a1..ad2aaa1e6c 100644 --- a/roles/ci_gen_kustomize_values/templates/bmo01/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/bmo01/network-values/values.yaml.j2 @@ -2,8 +2,11 @@ # source: bmo01/network-values/values.yaml.j2 {% set _ipv = cifmw_ci_gen_kustomize_values_ip_version_var_mapping %} {% set ns = namespace(ocp_index=0) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/common/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/common/network-values/values.yaml.j2 index 5f3cf99b28..9523f9a372 100644 --- a/roles/ci_gen_kustomize_values/templates/common/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/common/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/dcn/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/dcn/network-values/values.yaml.j2 index ed85d77c5e..1cec59c438 100644 --- a/roles/ci_gen_kustomize_values/templates/dcn/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/dcn/network-values/values.yaml.j2 @@ -3,8 +3,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% for network in cifmw_networking_env_definition.instances[host]['networks'].values() -%} {% set ns.interfaces = ns.interfaces | combine({network.network_name: (network.parent_interface | diff --git a/roles/ci_gen_kustomize_values/templates/multi-namespace/network-values2/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/multi-namespace/network-values2/values.yaml.j2 index a9ad9c29dc..862400593f 100644 --- a/roles/ci_gen_kustomize_values/templates/multi-namespace/network-values2/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/multi-namespace/network-values2/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/osasinfra-ipv6/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/osasinfra-ipv6/network-values/values.yaml.j2 index 4db10941c9..c038470e34 100644 --- a/roles/ci_gen_kustomize_values/templates/osasinfra-ipv6/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/osasinfra-ipv6/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/shiftstack/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/shiftstack/network-values/values.yaml.j2 index f9b4a4933a..422cea1f04 100644 --- a/roles/ci_gen_kustomize_values/templates/shiftstack/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/shiftstack/network-values/values.yaml.j2 @@ -1,6 +1,8 @@ --- # source: shiftstack/network-values/values.yaml.j2 {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + data: {% for host in cifmw_networking_env_definition.instances.keys() -%} diff --git a/roles/ci_gen_kustomize_values/templates/uni01alpha-adoption/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/uni01alpha-adoption/network-values/values.yaml.j2 index e17e9d1257..d33b215eb1 100644 --- a/roles/ci_gen_kustomize_values/templates/uni01alpha-adoption/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/uni01alpha-adoption/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in chost_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/uni01alpha/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/uni01alpha/network-values/values.yaml.j2 index 11b7f5230a..67d2dbaea5 100644 --- a/roles/ci_gen_kustomize_values/templates/uni01alpha/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/uni01alpha/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/uni04delta-ipv6-adoption/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/uni04delta-ipv6-adoption/network-values/values.yaml.j2 index 5c33c206fb..b9c13f6668 100644 --- a/roles/ci_gen_kustomize_values/templates/uni04delta-ipv6-adoption/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/uni04delta-ipv6-adoption/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/uni04delta-ipv6/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/uni04delta-ipv6/network-values/values.yaml.j2 index 3b48d68758..4bca53b051 100644 --- a/roles/ci_gen_kustomize_values/templates/uni04delta-ipv6/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/uni04delta-ipv6/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/uni05epsilon/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/uni05epsilon/network-values/values.yaml.j2 index 526b09deb6..8c375bebc9 100644 --- a/roles/ci_gen_kustomize_values/templates/uni05epsilon/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/uni05epsilon/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/uni06zeta/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/uni06zeta/network-values/values.yaml.j2 index a88987a16d..f1158750f2 100644 --- a/roles/ci_gen_kustomize_values/templates/uni06zeta/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/uni06zeta/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %} diff --git a/roles/ci_gen_kustomize_values/templates/uni07eta/network-values/values.yaml.j2 b/roles/ci_gen_kustomize_values/templates/uni07eta/network-values/values.yaml.j2 index 2df6024b6c..2e530361f4 100644 --- a/roles/ci_gen_kustomize_values/templates/uni07eta/network-values/values.yaml.j2 +++ b/roles/ci_gen_kustomize_values/templates/uni07eta/network-values/values.yaml.j2 @@ -4,8 +4,11 @@ {% set ns = namespace(interfaces={}, ocp_index=0, lb_tools={}) %} +{% set host_sorted_array=cifmw_networking_env_definition.instances.keys() | list | reverse %} + + data: -{% for host in cifmw_networking_env_definition.instances.keys() -%} +{% for host in host_sorted_array -%} {% if host is match('^(ocp|crc).*') %} node_{{ ns.ocp_index }}: {% set ns.ocp_index = ns.ocp_index+1 %}