Skip to content

Commit 6927507

Browse files
hjensasopenshift-merge-bot[bot]
authored andcommitted
Generate adoption_vars networks dynamically
uni01alpha does not have the storagemgmt network, instead of hard-coding the networks for `edpm_nodes` let's loop on node_nets.networks.keys()
1 parent 589df5a commit 6927507

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,13 @@ edpm_nodes:
2323
ansible:
2424
ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }}
2525
networks:
26+
{% for net in node_nets.networks.keys() %}
2627
- defaultRoute: true
27-
fixedIP: {{ node_nets.networks.ctlplane.ip_v4 }}
28-
name: ctlplane
29-
subnetName: subnet1
30-
- name: internalapi
31-
fixedIP: {{ node_nets.networks.internalapi.ip_v4 }}
32-
subnetName: subnet1
33-
- name: storage
34-
fixedIP: {{ node_nets.networks.storage.ip_v4 }}
35-
subnetName: subnet1
36-
- name: storagemgmt
37-
fixedIP: {{ node_nets.networks.storagemgmt.ip_v4 }}
38-
subnetName: subnet1
39-
- name: tenant
40-
fixedIP: {{ node_nets.networks.tenant.ip_v4 }}
28+
fixedIP: {{ node_nets.networks[net].ip_v4 }}
29+
name: {{ net }}
4130
subnetName: subnet1
4231
{% endfor %}
32+
{% endfor %}
4333

4434
upstream_dns: {{ cifmw_networking_env_definition.networks.ctlplane.dns_v4 | first }}
4535
os_cloud_name: {{ cifmw_adoption_osp_deploy_scenario.stacks[0].stackname }}

0 commit comments

Comments
 (0)