provider_networks¶
Synopsis¶
Parse a list of networks and return data that Ansible can use.
Examples¶
## This is what the provider_networks list should look like.
# provider_networks:
# - network:
# container_bridge: "br-mgmt"
# container_type: "veth"
# container_interface: "eth1"
# ip_from_q: "container"
# type: "raw"
# group_binds:
# - all_containers
# - hosts
# is_container_address: true
# is_ssh_address: true
# - network:
# container_bridge: "br-vxlan"
# container_type: "veth"
# container_interface: "eth10"
# ip_from_q: "tunnel"
# type: "vxlan"
# range: "1:1000"
# net_name: "vxlan"
# group_binds:
# - neutron_linuxbridge_agent
# - network:
# container_bridge: "br-vxlan"
# container_type: "veth"
# container_interface: "eth10"
# ip_from_q: "tunnel"
# type: "geneve"
# range: "1:1000"
# net_name: "geneve"
# group_binds:
# - neutron_ovn_northd
# - neutron_ovn_controller
# - network:
# container_bridge: "br-vlan"
# container_type: "veth"
# container_interface: "eth12"
# host_bind_override: "eth12"
# type: "flat"
# net_name: "flat"
# group_binds:
# - neutron_linuxbridge_agent
# - network:
# container_bridge: "br-vlan"
# container_type: "veth"
# container_interface: "eth11"
# host_bind_override: "eth11"
# sriov_host_interfaces: "p1p1,p1p2"
# type: "vlan"
# range: "1:1, 101:101"
# net_name: "vlan"
# group_binds:
# - neutron_linuxbridge_agent
# - network:
# host_bind_override: "bond1"
# type: "vlan"
# net_name: "physnet1"
# group_binds:
# - neutron_linuxbridge_agent
# - network:
# host_bind_override: "bond2"
# type: "vlan"
# net_name: "physnet2_rack1"
# range: "1:999"
# reference_group: "rack1_hosts"
# group_binds:
# - neutron_linuxbridge_agent
# - network:
# host_bind_override: "bond2"
# type: "vlan"
# net_name: "physnet2_rack2"
# range: "1000:1999"
# reference_group: "rack2_hosts"
# group_binds:
# - neutron_linuxbridge_agent
# - network:
# container_bridge: "br-provider"
# container_type: "veth"
# container_interface: "eth11"
# network_interface: "bond1"
# type: "vlan"
# range: "1:1, 101:101"
# net_name: "physnet1"
# group_binds:
# - neutron_openvswitch_agent
# - network:
# container_bridge: "br-provider"
# container_type: "veth"
# container_interface: "eth11"
# network_bond_interfaces:
# - "0000:02:00.0"
# - "0000:02:00.1"
# bond_mode: balance-tcp
# bond_updelay: 100
# bond_downdelay: 100
# lacp: active
# type: "vlan"
# range: "1:1, 101:101"
# net_name: "physnet1"
# group_binds:
# - neutron_openvswitch_agent
# - network:
# container_bridge: "br-storage"
# container_type: "veth"
# container_interface: "eth2"
# ip_from_q: "storage"
# type: "raw"
# group_binds:
# - glance_api
# - cinder_api
# - cinder_volume
# - nova_compute
# - swift_proxy
- name: Test provider networks
provider_networks:
provider_networks: "{{ provider_networks }}"
register: pndata1
- name: Test provider networks is metal
provider_networks:
provider_networks: "{{ provider_networks }}"
is_metal: true
register: pndata2
- name: Test provider networks with prfix
provider_networks:
provider_networks: "{{ provider_networks }}"
bind_prefix: "brx"
is_metal: true
register: pndata3
## Module output:
# {
# "network_flat_networks": "flat",
# "network_flat_networks_list": [
# "flat"
# ],
# "network_mappings": "flat:brx-eth12,vlan:brx-eth11",
# "network_mappings_list": [
# "flat:brx-eth12",
# "vlan:brx-eth11"
# ],
# "network_bond_interfaces_mappings": [{
# 'bridge': 'br-provider',
# 'interfaces': ['0000:02:00.0', '0000:02:00.1'],
# 'bond_mode': 'balance-tcp',
# 'lacp': 'active',
# 'bond_updelay': 100,
# 'bond_downdelay': 100
# }],
# "network_sriov_mappings": "physnet1:p1p1,physnet1:p1p2",
# "network_sriov_mappings_list": [
# "physnet1:p1p1"
# "physnet1:p1p2"
# ],
# "network_types": "vxlan,flat,vlan,geneve",
# "network_types_list": [
# "vxlan",
# "flat",
# "vlan",
# "geneve"
# ],
# "network_vlan_ranges": "vlan:1:1,vlan:1024:1025",
# "network_vlan_ranges_list": [
# "vlan:1:1",
# "vlan:1024:1025"
# ],
# "network_vxlan_ranges": "1:1000",
# "network_vxlan_ranges_list": [
# "1:1000"
# ]
# "network_geneve_ranges": "1:1000",
# "network_geneve_ranges_list": [
# "1:1000"
# ]
# }