From f783b9f0e7a0a49ee1635d9a0b4596781f3d82fa Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Sat, 26 Sep 2020 12:09:44 +0530 Subject: [PATCH] Add nic template for ci jobs using multi-nics This adds a ci specific template used in ovb multinode jobs. Depends-On: https://review.opendev.org/#/c/752368/ Change-Id: Idec264a53f4028358954903dbe9bfee032a2b555 --- .../templates/ci/multiple_nics.j2 | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics.j2 diff --git a/tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics.j2 b/tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics.j2 new file mode 100644 index 000000000..f57995f79 --- /dev/null +++ b/tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics.j2 @@ -0,0 +1,67 @@ +--- +network_config: +- type: interface + name: nic1 + mtu: 1350 + use_dhcp: false + addresses: + - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }} + routes: + - default: true + next_hop: {{ ctlplane_gateway_ip }} +{% if 'External' in role_networks or 'external_bridge' in role_tags %} +- type: ovs_bridge + name: br-ex + dns_servers: {{ ctlplane_dns_nameservers }} + domain: {{ dns_search_domains }} + use_dhcp: false + routes: + - ip_netmask: 0.0.0.0/0 + next_hop: {{ external_gateway_ip | default('10.0.0.1') }} + members: + - type: interface + name: nic2 + mtu: 1350 + primary: true +{% endif %} +{% if 'External' in role_networks %} + addresses: + - ip_netmask: {{ external_ip }}/{{ external_cidr }} +{% endif %} +{% if 'InternalApi' in role_networks %} +- type: interface + name: nic3 + mtu: 1350 + use_dhcp: false + addresses: + - ip_netmask: {{ internal_api_ip }}/{{ internal_api_cidr }} +{% endif %} +{% if 'Storage' in role_networks %} +- type: interface + name: nic4 + mtu: 1350 + use_dhcp: false + addresses: + - ip_netmask: {{ storage_ip }}/{{ storage_cidr }} +{% endif %} +{% if 'StorageMgmt' in role_networks %} +- type: interface + name: nic5 + mtu: 1350 + use_dhcp: false + addresses: + - ip_netmask: {{ storage_mgmt_ip }}/{{ storage_mgmt_cidr }} +{% endif %} +{% if 'Tenant' in role_networks %} +- type: ovs_bridge + name: br-tenant + dns_servers: {{ ctlplane_dns_nameservers }} + use_dhcp: false + addresses: + - ip_netmask: {{ tenant_ip }}/{{ tenant_cidr }} + members: + - type: interface + name: nic6 + mtu: 1350 + primary: true +{% endif %}