kpfleming.systemd_networkd.link role – Manages systemd-networkd links.
Note
This role is part of the kpfleming.systemd_networkd collection (version 25.9.0).
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.link.
Entry point main – Manages systemd-networkd links.
Synopsis
- This role will create (or update) one item in /etc/systemd/network for each specified link: a .link file for the link. 
- 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 links is attempted. 
- Detailed descriptions of parameters and their behavior can be found in ‘man systemd.link’. 
- Sets fact named ‘systemd_networkd_link_changed’ to either true or false to indicate whether any changes were made. 
Parameters
| Parameter | Comments | 
|---|---|
| Attributes of the links to be managed. | |
| Attributes of the link. | |
| Policy for setting the MAC address of the link. Choices: 
 | |
| The MTU for the link. | |
| Policy for setting the name of the link. Choices: 
 | |
| Matching attributes of the link. | |
| Device-specific attributes to be matched. | |
| Match udev ID_NET_DRIVER. | |
| Match netlink IFLA_INFO_KIND. | |
| Match current MAC address. | |
| Match udev INTERFACE. | |
| Match udev ID_PATH. | |
| Match permanent MAC address. | |
| Match udev property. | |
| Match udev DEVTYPE. | |
| System-specific attributes to be matched. | |
| Match system architecture. | |
| Match service credential. | |
| Match system firmware. | |
| Match hostname or machine ID. | |
| Match kernel command line option presence. | |
| Match kernel version expression. | |
| Match virtualization type. | |
| Name of the link. | |
| Suppress the reloading of systemd-networkd if changes are made. Choices: 
 | |
| Root path of filesystem containing systemd-networkd configuration files. Default:  | 
