commit 010d93b602c295bbafae1bb60b5b6d851799a518 Author: Rabi Mishra Date: Wed Oct 7 09:57:41 2020 +0530 Add templates for CI multiple_nics_ipv6 and public_bond config This adds the templates for remaining ci nic configs. public-bond configuration does not seem to used in any of the featuresets. However, it's been added as there may be someone out there using it. We can probably remove it later. Change-Id: I38def3eb86f7d8fb17879653d74601ccd2f9ec96 diff --git a/tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics_ipv6.j2 b/tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics_ipv6.j2 new file mode 100644 index 0000000..c7c9d4a --- /dev/null +++ b/tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics_ipv6.j2 @@ -0,0 +1,65 @@ +--- +network_config: +- type: interface + name: nic1 + mtu: 1350 + use_dhcp: false + addresses: + - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }} +{% 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: + - default: true + ip_netmask: ::/0 + next_hop: {{ external_gateway_ip }} + 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 %} diff --git a/tripleo_ansible/roles/tripleo_network_config/templates/ci/public_bond.j2 b/tripleo_ansible/roles/tripleo_network_config/templates/ci/public_bond.j2 new file mode 100644 index 0000000..d8636b6 --- /dev/null +++ b/tripleo_ansible/roles/tripleo_network_config/templates/ci/public_bond.j2 @@ -0,0 +1,75 @@ +--- +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: ovs_bond + name: bond1 + ovs_options: {{ bound_interface_ovs_options }} + members: + - type: interface + name: nic2 + mtu: 1350 + primary: true + - type: interface + name: nic3 + 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: nic4 + mtu: 1350 + use_dhcp: false + addresses: + - ip_netmask: {{ internal_api_ip }}/{{ internal_api_cidr }} +{% endif %} +{% if 'Storage' in role_networks %} +- type: interface + name: nic5 + mtu: 1350 + use_dhcp: false + addresses: + - ip_netmask: {{ storage_ip }}/{{ storage_cidr }} +{% endif %} +{% if 'StorageMgmt' in role_networks %} +- type: interface + name: nic6 + 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: nic7 + mtu: 1350 + primary: true +{% endif %}