TripleO Ansible project repository. Contains playbooks for use with TripleO OpenStack deployments.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

69 lines
2.3 KiB

---
network_config:
- type: interface
name: nic1
mtu: {{ ctlplane_mtu }}
dns_servers: {{ ctlplane_dns_nameservers }}
domain: {{ dns_search_domains }}
routes: {{ ctlplane_host_routes }}
use_dhcp: false
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }}
{% set nics_used = [1] %}
{% for network in networks_all if network not in networks_skip_config %}
{% if network not in ["External", "Tenant"] and network in role_networks %}
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
- type: vlan
device: nic{{ loop.index + 1 }}
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') }}
{% elif network in role_networks or 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}
{% else %}
name: {{ 'br-' ~ networks_lower[network] }}
{% endif %}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
members:
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
primary: true
- 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') }}
{% endif %}
{% set _ = nics_used.append(loop.index) %}
{% endfor %}
- type: ovs_user_bridge
name: br-dpdk0
members:
- type: ovs_dpdk_bond
name: dpdkbond0
rx_queue: {{ num_dpdk_interface_rx_queues }}
members:
- type: ovs_dpdk_port
name: dpdk0
members:
- type: interface
name: nic{{nics_used[-1] + 1}}
- type: ovs_dpdk_port
name: dpdk1
members:
- type: interface
name: nic{{nics_used[-1] + 2}}