locationlabs.el-network
el-network
Ansible role for managing network interfaces on enterprise Linux.
Requirements
- netaddr
Note: This role does not work with firewalld.
Role Variables
el_network_interfaces
: List of network interfacesiface
: Name of the interface- Common interface options:
ip4
: IPv4 address in CIDR formatgw4
: Default gatewaybridge
: Name of the bridge interface it belongs to
type
: Type of interface- ethernet
dhcp
: Enable DHCPvlan
: Enable VLAN support
- bond-slave
master
: Name of the parent bond interface
- bond
bonding_mode
: Default value 4 - 802.3adlacp_rate
: Default value 1 - fastxmit_hash_policy
: Default value layer3+4miimon
: Default value 100
- bridge
- ethernet
el_network_whitelist_ifaces
: List of interfaces that should not be removed. Typically includes lo and idrac.el_network_configured_ifaces
: Automatically generated list of interfaces on the target host that will be configured.
Dependencies
N/A
Example Playbook
Example variable setup:
el_network_interfaces:
- iface: ens32
type: ethernet
ip4: '192.168.0.10/24'
- iface: ens33
type: bond-slave
master: bond0
- iface: bond0
type: bond
bonding_mode: 4
bridge: br0
- iface: bond0.10
type: ethernet
vlan: yes
- iface: br0
type: bridge
ip4: '10.0.0.10/24'
gw4: '10.0.0.1'
Then, simply run the role:
- hosts: servers
roles:
- el-network
OVS
Basic support for Open vSwitch (OVS) is available to connect an interface and/or bridge into OVS. Note: This role does not install OVS; that is the administrator's responsibility.
el_network_interfaces:
- iface: ens33
type: ethernet
bridge: br-ex
ovs: yes
- iface: br-ex
type: bridge
ovs: yes
ip4: '172.16.0.10/24'
Installa
ansible-galaxy install locationlabs.el-network
Licenza
apache-2.0
Download
240
Proprietario