provider_networks

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-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:
#     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_sriov_mappings": "physnet1:p1p1,physnet1:p1p2",
#         "network_sriov_mappings_list": [
#             "physnet1:p1p1"
#             "physnet1:p1p2"
#         ],
#         "network_types": "vxlan,flat,vlan",
#         "network_types_list": [
#             "vxlan",
#             "flat",
#             "vlan"
#         ],
#         "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"
#         ]
# }
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.