kpfleming.systemd_networkd.tunnel role – Manages systemd-networkd tunnel virtual network devices.
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.tunnel.
Entry point main – Manages systemd-networkd tunnel virtual network devices.
Synopsis
- This role will create (or update) three items in /etc/systemd/network for each specified tunnel: 1) A drop-in directory for the underlying network 2) A .netdev file for the tunnel device 3) A .conf file in the drop-in directory connecting the tunnel device to the underlying network 
- Detailed descriptions of parameters and their behavior can be found in ‘man systemd.netdev’. 
- Sets fact named ‘systemd_networkd_tunnel_changed’ to either true or false to indicate whether any changes were made. 
Parameters
| Parameter | Comments | 
|---|---|
| Suppress the reloading of systemd-networkd if changes are made. Choices: 
 | |
| Root path of filesystem containing systemd-networkd configuration files. Default:  | |
| Attributes of the tunnels to be managed. | |
| Matching attributes of the network device. | |
| 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 tunnel device. | |
| Attributes of the tunnel network device. | |
| MAC address to use on the device. | |
| The MTU for the device. | |
| Attributes of the tunnel device. | |
| Tunnel key to use for input traffic if using VTI/VTI6, GRE, GRETAP or ERSPAN tunnel. Must be an integer or an IPv4 address-like dotted quad. | |
| Tunnel key to use in both directions (input and output) if using VTI/VTI6, GRE, GRETAP or ERSPAN tunnel. Must be an integer or an IPv4 address-like dotted quad. | |
| Type of tunnel. Choices: 
 | |
| Local address for tunneled packets. | |
| Tunnel key to use for output traffic if using VTI/VTI6, GRE, GRETAP or ERSPAN tunnel. Must be an integer or an IPv4 address-like dotted quad. | |
| Remote address for tunneled packets. | |
| Time-To-Live for tunneled packets. | |
| The underlying network. | 
