From 229088981e974b18bf375244a5c2024e33461112 Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Wed, 6 Mar 2024 15:10:02 +0000 Subject: [PATCH] Update `edpm_network_config_template` docs example Signed-off-by: Fabricio Aguiar --- docs/assemblies/common_configurations.adoc | 33 +++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/assemblies/common_configurations.adoc b/docs/assemblies/common_configurations.adoc index fab56098d..e5ba556ab 100644 --- a/docs/assemblies/common_configurations.adoc +++ b/docs/assemblies/common_configurations.adoc @@ -107,12 +107,43 @@ field that shows defining the variables that configure the `edpm_network_config` role. ansibleVars: - edpm_network_config_template: templates/single_nic_vlans/single_nic_vlans.j2 ctlplane_ip: 192.168.122.100 internalapi_ip: 172.17.0.100 storage_ip: 172.18.0.100 tenant_ip: 172.19.0.100 fqdn_internalapi: edpm-compute-0.example.com + edpm_network_config_template: | + --- + {% set mtu_list = [ctlplane_mtu] %} + {% for network in role_networks %} + {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} + {%- endfor %} + {% set min_viable_mtu = mtu_list | max %} + network_config: + - type: ovs_bridge + name: {{ neutron_physical_bridge_name }} + mtu: {{ min_viable_mtu }} + use_dhcp: false + dns_servers: {{ ctlplane_dns_nameservers }} + domain: {{ dns_search_domains }} + addresses: + - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }} + routes: {{ ctlplane_host_routes }} + members: + - type: interface + name: nic1 + mtu: {{ min_viable_mtu }} + # force the MAC address of the bridge to this interface + primary: true + {% for network in role_networks %} + - type: vlan + mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} + vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} + addresses: + - ip_netmask: + {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} + routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} + {% endfor %} This configuration would be applied by the <<_dataplane_operator_provided_services,configure-network>> service when