add the network interfaces configuration
Description
We need an action that will allow us to create interfaces configuration. CentOS is our top priority.
Proposal
API suggestions:
-
networking_interfaces
:-
name
: interface name -
boot_protocol
:dhcp
/none
-
(optional)
ip
:network
address
-
(optional)
gateway
-
(optional)
bonding
:-
(optional)
master
- e.g. value "bond0" indicates that the interface is a slave of the bond0 -
(optional)
options
- dict with bonding options
-
(optional)
-
(optional)
mtu
, default1500
-
Examples:
networking_interfaces:
#InfiniBand example with static address
- name: "ib0"
boot_protocol: "none"
ip:
network: "192.168.0.0/24"
address: "192.168.0.7"
#Bonding example
- name: "eth0"
boot_protocol: "none"
bonding:
master: "bond0"
- name: "eth1"
boot_protocol: "none"
bonding
master: "bond0"
- name: "bond0"
boot_protocol: "none"
bonding:
options:
mode: 4
miimon: 100
#vlan example with DHCP
- name: "bond0.1111"
boot_protocol: "dhcp"
#interface with custom gateway and mtu
- name: "bond0"
boot_protocol: "none"
mtu: 7
ip:
network: "10.0.0.0/24"
address: "10.0.0.5"
gateway: "10.0.0.254"
Links / references
Nope.
Edited by Bartłomiej Daca