kpfleming.systemd_networkd.bond role – Manages systemd-networkd bonded network devices.

Note

This role is part of the kpfleming.systemd_networkd collection (version 25.7.1).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install kpfleming.systemd_networkd.

To use it in a playbook, specify: kpfleming.systemd_networkd.bond.

Entry point main – Manages systemd-networkd bonded network devices.

Synopsis

  • This role will create (or update) a number of items in /etc/systemd/network for each specified bonded device: 1) A .netdev file for the bond device 2) .network files for each link that is a member of the bond; files will be named with the bond device’s name and a numeric suffix 3) .link files for each interface that is a member of the bond; files will be named with the bond device’s name and a numeric suffix

  • On Debian and Debian-derivative systems the .link files are copied into the initramfs by the `update-initramfs` tool, which means that the system must be rebooted for changes in those files to take effect. In this situation the role will set a fact named ‘systemd_networkd_link_reboot_required’ and the system should be rebooted before any additional configuration of the bonded network links is attempted.

  • Detailed descriptions of parameters and their behavior can be found in ‘man systemd.netdev’ and ‘man systemd.link’.

  • Sets fact named ‘systemd_networkd_bond_changed’ to either true or false to indicate whether any changes were made.

Parameters

Parameter

Comments

bonds

list / elements=dictionary / required

Attributes of the bond devices to be managed.

bond

dictionary

Attributes of the bond device.

down_delay_sec

string

Delay between the minimum number of members reaching ‘link down’ and ‘link down’ being reported for the bond.

lacp_transmit_rate

string

LACP data unit transmission rate (only used in 802.3ad mode).

Choices:

  • "slow"

  • "fast"

mii_monitor_sec

string

Frequency of MII link monitoring.

integer

Minimum number of active members for the device to report that it ‘has carrier’.

mode

string

Bonding mode.

Choices:

  • "balance-rr"

  • "active-backup"

  • "balance-xor"

  • "broadcast"

  • "802.3ad"

  • "balance-tlb"

  • "balance-alb"

transmit_hash_policy

string

Policy for member selection during transmit.

Choices:

  • "layer2"

  • "layer3+4"

  • "layer2+3"

  • "encap2+3"

  • "encap3+4"

up_delay_sec

string

Delay between the minimum number of members reaching ‘link up’ and ‘link up’ being reported for the bond.

match

dictionary

Matching attributes of the bond network device.

system

dictionary

System-specific attributes to be matched.

architecture

string

Match system architecture.

credential

string

Match service credential.

firmware

string

Match system firmware.

host

string

Match hostname or machine ID.

kernel_command_line

string

Match kernel command line option presence.

kernel_version

string

Match kernel version expression.

virtualization

string

Match virtualization type.

members

list / elements=dictionary / required

Matching attributes of the bond’s member interfaces.

device

dictionary

Device-specific attributes to be matched.

driver

list / elements=string

Match udev ID_NET_DRIVER.

kind

list / elements=string

Match netlink IFLA_INFO_KIND.

mac_address

list / elements=string

Match current MAC address.

original_name

list / elements=string

Match udev INTERFACE.

path

list / elements=string

Match udev ID_PATH.

permanent_mac_address

list / elements=string

Match permanent MAC address.

property

list / elements=string

Match udev property.

type

list / elements=string

Match udev DEVTYPE.

system

dictionary

System-specific attributes to be matched.

architecture

string

Match system architecture.

credential

string

Match service credential.

firmware

string

Match system firmware.

host

string

Match hostname or machine ID.

kernel_command_line

string

Match kernel command line option presence.

kernel_version

string

Match kernel version expression.

virtualization

string

Match virtualization type.

name

string / required

Name of the bond device.

netdev

dictionary

Attributes of the bond network device.

mac_address

string

MAC address to use on the device.

mtu_bytes

string

The MTU for the device.

suppress_reload

boolean

Suppress the reloading of systemd-networkd if changes are made.

Choices:

  • false ← (default)

  • true

systemd_root

string

Root path of filesystem containing systemd-networkd configuration files.

Default: ""