Browse Source

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
changes/91/754491/7
Rabi Mishra 2 years ago
parent
commit
f783b9f0e7
  1. 67
      tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics.j2

67
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 %}
Loading…
Cancel
Save