kpfleming.systemd_networkd.vlan role – Manages systemd-networkd VLAN virtual network devices.

Note

This role is part of the kpfleming.systemd_networkd collection (version 24.1.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.vlan.

Entry point main – Manages systemd-networkd VLAN virtual network devices.

Synopsis

  • This role will create (or update) three items in /etc/systemd/network for each specified VLAN: 1) A drop-in directory for the underlying network 2) A .netdev file for the VLAN device 3) A .conf file in the drop-in directory connecting the VLAN device to the underlying network

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

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

Parameters

Parameter

Comments

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: ""

vlans

list / elements=dictionary / required

Attributes of the devices to be managed.

id

integer / required

The VLAN ID number (1-4095).

match

dictionary

Matching attributes of the 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.

name

string / required

Name of the network device.

underlying_name

string / required

The underlying network.