kpfleming.systemd_networkd.network role – Manages systemd-networkd networks.
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.network
.
Entry point main
– Manages systemd-networkd networks.
Synopsis
This role operates in one of two modes: 1) When “drop_in_for” is not specified, creates a .network file in /etc/systemd/network using the supplied “name”, and applies the configuration provided to that file. 2) When “drop_in_for” is specified, creates a .conf file in the drop-in directory for the network specified, using the supplied “name”, and applies the configuration provided to that file.
Detailed descriptions of parameters and their behavior can be found in ‘man systemd.network’.
Sets fact named ‘systemd_networkd_network_changed’ to either true or false to indicate whether any changes were made.
Parameters
Parameter |
Comments |
---|---|
Issues a reload asynchronously when one is needed; this can be used when the configuration change has changed the IP address of the network that Ansible is using to manage the system. Choices:
|
|
Name of network to which this configuration should be applied as a drop-in. |
|
Attributes of the networks to be managed. |
|
Addresses to be used on the network. |
|
An IPv4 or IPv6 address. |
|
The broadcast address of the network. |
|
Controls Duplicate Address Detection for this address. Choices:
|
|
Whether this network is the system’s home address. Choices:
|
|
Inserts information from this address into an nftables set. |
|
The address of the peer on a point-to-point network. |
|
Attributes of the Common Applications Kept Enhanced (CAKE) queueing discipline (qdisc). |
|
Bandwidth for the shaper, in bits-per-second. Suffixes K, M, and G can be used. |
|
Compensate for ATM or PTM framing and bit encoding. Choices:
|
|
Method use for providing fairness between queues in the shaper. Choices:
|
|
Round the net packet size (after overhead bytes have been added) to a minimum of this value. |
|
Perform NAT lookups to obtain true source host addresses before constructing flows. Choices:
|
|
Number of bytes to be added to the raw data size of each packet. |
|
Construct tins (of flow-isolation queues) using the selected mechanism. Choices:
|
|
Split General Segmentation Offload (GSO) super-packets into their on-the-wire components and dequeue them individually. Choices:
|
|
Clear DSCP fields, except ECN bits, of packets which pass through the shaper. Choices:
|
|
Configure a subnet from a delegated prefix on the network. |
|
Include delegated prefix in Router Advertisements. Choices:
|
|
Assign an address from the delegated prefix. Choices:
|
|
Inserts information from the subnet delegation into an nftables set. |
|
Specify the subnet ID to be allocated from the delegated prefix. |
|
Mode, and pattern, used to generate an address for assignment. |
|
Indicate which interface will provide the delegated prefix. |
|
Configure the DHCP server. |
|
Default lease validity time. |
|
DNS recursive resolver addresses. |
|
Send DNS recursive resolver addresses. Choices:
|
|
NTP server addresses. Choices:
|
|
Send NTP server addresses. Choices:
|
|
Send timezone. Choices:
|
|
Maximum lease validity time. |
|
NTP server addresses. |
|
Store leases in persistent storage. Choices:
|
|
Offset (from the subnet’s base address) of the first address available in the pool. |
|
Number of addresses in the pool. |
|
Support simplified two-message lease assignment. Choices:
|
|
Address of the default gateway. |
|
Address of the DHCP server. |
|
Timezone to send. |
|
Interface from which to obtain DNS recursive resolver and NTP server addresses. |
|
A static lease in the DHCP server. |
|
Address to lease. |
|
Hardware address of the client. |
|
Attributes of the DHCPv4 client on the network. |
|
Method used to construct the Client Identifier. Choices:
|
|
Hostname to be sent. |
|
Inserts information from this DHCP client into an nftables set. |
|
Whether routes to the provided DNS server(s) should be added to the routing table. Choices:
|
|
Whether routes to the provided NTP server(s) should be added to the routing table. Choices:
|
|
Whether local hostname should be sent to the DHCP server. Choices:
|
|
Whether an assigned address should be released when the network is stopped. Choices:
|
|
Whether DNS server(s) provided by the DHCP server should be used. Choices:
|
|
Whether the default route provided by the DHCP server should be added to the routing table. Choices:
|
|
Whether the hostname provided by the DHCP server should be used. Choices:
|
|
Whether NTP server(s) provided by the DHCP server should be used. Choices:
|
|
Whether routes provided by the DHCP server should be added to the routing table. Choices:
|
|
Attributes of the DHCPv6 client on the network. |
|
Inserts information from this DHCP client into an nftables set. |
|
An IPv6 address with prefix length to be set to the DHCP server. |
|
Whether an assigned address should be released when the network is stopped. Choices:
|
|
Route type to be injected into the routing table for the delegated prefix. Choices:
|
|
Whether address(es) provided by the DHCP server should be used. Choices:
|
|
Request a delegated prefix from the DHCP server. Choices:
|
|
Whether DNS server(s) provided by the DHCP server should be used. Choices:
|
|
Whether the hostname provided by the DHCP server should be used. Choices:
|
|
Whether NTP server(s) provided by the DHCP server should be used. Choices:
|
|
Whether the client should be started even if an RA does not indicate it is needed. Choices:
|
|
Attributes of the IPv6 RA client on the network. |
|
Mode, and pattern, used to generate a SLAAC address. |
|
Whether DNS server(s) provided by the RA should be used. Choices:
|
|
Whether the default route provided by the RA should be added to the routing table. Choices:
|
|
Whether the MTU provided by the RA should be used. Choices:
|
|
IPv6 prefixes to be included in RAs on the network. |
|
Enable SLAAC. Choices:
|
|
Assign an address from the prefix. Choices:
|
|
Indicates whether the prefix is used on this subnet. Choices:
|
|
Preferred lifetime for addresses generated from the prefix. |
|
Prefix to distribute. |
|
Metric used for the route associated with the prefix if an address is assigned. |
|
Mode, and pattern, used to generate an address for assignment. |
|
Valid lifetime for addresses generated from the prefix. |
|
IPv6 routes to be included in RAs on the network. |
|
Lifetime of the prefix. |
|
Prefix to distribute. |
|
Attributes of the IPv6 RA server on the network. |
|
DNS recursive resolver addresses. |
|
DNS search domains. |
|
Send DNS recursive resolver addresses. Choices:
|
|
Send DNS search domains. Choices:
|
|
Duration which clients can assume the router is reachable after receiving an advertisement. |
|
Duration which clients will use to retransmit reachability detection messages. |
|
Preference of this router on the subnet. Choices:
|
|
Interface from which to obtain DNS recursive resolver addresses and search domains. |
|
Attributes of the link used by the network. |
|
How the network should or should not be activated. Choices:
|
|
The MAC address to be used for the network. |
|
The MTU for the network. |
|
Which address family(ies) are considered when determining ‘online’ status. Choices:
|
|
Whether the network is included in the ‘online’ status determination. Choices:
|
|
Matching attributes of the network. |
|
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 network. |
|
Attributes of the network. |
|
Bind carrier status to other networks. |
|
Bridge device into which this network should be added. |
|
Allow network configuration without carrier. Choices:
|
|
Configure DHCP clients on the network. Choices:
|
|
Requests subnet prefixes on another link via the DHCPv6 protocol or via the 6RD option in the DHCPv4 protocol. Choices:
|
|
Enable the DHCPv4 server. Choices:
|
|
Configure DNS servers on the network. |
|
Configure LLDP emission on the network. Choices:
|
|
Configure IP forwarding (system-wide). Choices:
|
|
Enable forwarding of packets that arrive on this network. Choices:
|
|
Whether Router Advertisements should be accepted on the network. Choices:
|
|
The number of IPv6 DAD probes to send for a new address. |
|
Act as a host (false) or router (true). Choices:
|
|
Configure Proxy NDP support on the network. Choices:
|
|
Configure Proxy NDP addresses on the network. |
|
Whether Router Advertisements should be sent on the network. Choices:
|
|
Manage configuration when network is stopped. Choices:
|
|
Configure link-local addressing on the network. Choices:
|
|
Configure LLDP reception on the network. Choices:
|
|
Configure NTP servers on the network. |
|
Routes to be used by the network. |
|
IPv4 or IPv6 subnet which can be reached through gateway. |
|
IPv4 or IPv6 address of next-hop router. |
|
The route metric. |
|
The MTU to be applied to this route. |
|
IPv4 or IPv6 address to be preferred when sending packets via this route. |
|
Scope of the route (IPv4 only). Choices:
|
|
IPv4 or IPv6 subnet matched against source addresses for selection of this route. |
|
The routing table to add this route to. |
|
Type of route. Choices:
|
|
Rules for policy-based routing. |
|
Netfilter firewall mark to match. |
|
Source address prefix to match. |
|
Priority of this rule. |
|
Routing table to look up in case of match. |
|
Destination address prefix to match. |
|
Suppress the reloading of systemd-networkd if changes are made. Choices:
|
|
Root path of filesystem containing systemd-networkd configuration files. Default: |