Giter VIP home page Giter VIP logo

ansible-role-vxlan's Introduction

VXLAN

This role creates persistent VXLAN interfaces with the use of Network Scripts, NetworkManger, or Systemd-Networkd.

Role Variables

The role uses the same variable names as Network Scripts. It is recommended to review the documentation on Network Scripts. Below are the variables relevant and supported by this role.

vxlan_vni: sets the VXLAN network identifier for the VXLAN interfaces

vxlan_ttl: set the time-to-live for the packets transmitted over the interface

vxlan_phys_dev: set the physical device for the VXLAN interface to pair with

vxlan_dstport: set the port for the VXLAN to reside on

vxlan_bootproto: specify boot protocol used with the interface (unsupported when using NetworkManger or Systemd-Networkd, always none)

vxlan_onboot: set to yes if the VXLAN interface should be brought up on boot otherwise no (Not supported on Systemd-networkd)

vxlan_interfaces: list of interfaces to be created can set specific instances of the variables defined above in addition to some others

device: name assigned the VXLAN interface

ipaddr: the IPV4 address assigned to the VXLAN interface (unsupported when using NetworkManger or Systemd-Networkd)

prefix: the subnet mask use with the ipaddr (unsupported when using NetworkManger or Systemd-Networkd)

group: the multicast group the VXLAN will operate on

bridge: if set establish a bridge between this VXLAN and the specified interface

By default, Network Scripts will be used unless it is unavailable. Usage of either Network Scripts, NetworkManager or Systemd-Networkd can be enforced by setting force_ns, force_nm, or force_sd to true.

Example Playbook

Include the role into a playbook as you would any other role.

- hosts: host1
  roles:
    - role: vxlan
      vars:
        vxlan_vni: 10
        vxlan_interfaces:
          - device: vxlan0
            ipaddr: 192.168.0.2
            group: 224.0.0.100

For variables such as vxlan_ipaddr it is best to define them on a host by host basis.

/host_vars/host1

vxlan_interfaces:
  - device: vxlan0
    ipaddr: 192.168.0.2
    group: 224.0.0.100

/host_vars/host2

vxlan_interfaces:
  - device: vxlan0
    ipaddr: 192.168.0.3
    group: 224.0.0.100

You may also define multiple VXLAN interfaces per host however you must provide a unique vxlan_vni for each device defined in vxlan_interfaces

/host_vars/host1

vxlan_interfaces:
  - device: vxlan0
    vni: 10
    group: 224.0.0.200
  - device: vxlan1
    vni: 20
    group: 224.0.0.200

You may also set a bridge for vxlan interface to operate over.

/host_vars/host1

vxlan_interfaces:
  - device: vxlan0
    group: 224.0.0.10
    bridge: breth1

License

Apache License 2.0

Author Information

StackHPC

ansible-role-vxlan's People

Contributors

jackhodgkiss avatar alex-welsh avatar stackhpc-ci avatar technowhizz avatar

Stargazers

 avatar

Watchers

Pierre Riteau avatar Doug Szumski avatar Will Szumski avatar Mark Goddard avatar Stig Telfer avatar Matt Anson avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.