dandyrow.linux.systemd_networkd role – Configure basic defaults with systemd-networkd

Note

This role is part of the dandyrow.linux collection (version 2.6.0).

To install it use: ansible-galaxy collection install dandyrow.linux.

To use it in a playbook, specify: dandyrow.linux.systemd_networkd.

Entry point main – Configure basic defaults with systemd-networkd

Synopsis

  • Configure basic defaults with systemd-networkd.

Parameters

Parameter

Comments

config_wired

boolean

If true, will configure wired networking.

Choices:

  • false

  • true ← (default)

config_wireless

boolean

If true, will configure wireless networking.

Choices:

  • false ← (default)

  • true

dns_addresses

list / elements=string

DNS server address, must be in the format described in inet_pton(3).

Can be set to multiple addresses.

gateway_ip

string

Gateway IP address to use for the matched adapter.

Required when use_dhcp is set to false.

ip_addresses

list / elements=string

IP addresses to set the interface to.

Can be set to multiple addresses.

Required when use_dhcp is set to false.

use_dhcp

string

If true, will use DHCP to set IP, DNS & Gateway.

If false, ip_addresses and gateway_ip parameters are required.

Choices:

  • "yes" ← (default)

  • "no"

  • "ipv6"

  • "ipv4"

use_systemd_resolved

boolean

If true, will enable systemd_resolved to use for DNS resolution.

Choices:

  • false

  • true ← (default)

wired_adapter_name_match

string

Name to use to match network config to wired adapter.

Default: "en*"

wireless_adapter_name_match

string

Name to use to match network config to wireless adapter.

Default: "wl*"

Authors

  • Daniel Lowry (github.com/dandyrow)