networkmanager
: Manages NetworkManager connections
networkmanager::service
: Ensure and restarts NetworkManager Service
networkmanager::dns
: Manages the DNS informations about a particular NetworkManager connection
Manages NetworkManager connections
include networkmanager
class {'networkmanager':
enable_global_dns => false,
manage_dns => true,
nameservers => ['8.8.8.8', '8.8.4.4', '1.1.1.1'].
dns_searchdomains => ['example.com', 'uhu-banane.de', 'uhu-banane.net'],
dns_options => ['timeout:1', 'attempts:2', 'use-vc'],
manage_service => true.
ensure_service => running,
enable_service => true,
dns_notify_daemon => false,
connection_dnsoptions => {
wifi1 => {
nameservers => ['172.28.1.2', '172.30.1.2'],
searchdomains => ['home.example.com'],
dns_options => ['timeout:3', 'attempts:3', 'use-vc'],
notify_daemon => true,
},
},
}
---
networkmanager::enable_global_dns: false
networkmanager::manage_dns: true
networkmanager::nameservers:
- '8.8.8.8'
- '8.8.4.4'
- '1.1.1.1'
networkmanager::dns_searchdomains:
- 'example.com'
- 'uhu-banane.de'
- 'uhu-banane.net'
networkmanager::dns_options:
- 'timeout:1'
- 'attempts:2'
- 'use-vc'
networkmanager::manage_service: true
networkmanager::ensure_service: running
networkmanager::enable_service: true
networkmanager::dns_notify_daemon: false
networkmanager::connection_dnsoptions:
wifi1:
nameservers:
- '172.28.1.2'
- '172.30.1.2'
searchdomains:
- 'home.example.com'
dns_options:
- 'timeout:3'
- 'attempts:3'
- 'use-vc'
notify_daemon: true
The following parameters are available in the networkmanager
class:
enable_global_dns
global_nameservers
global_searchdomains
global_dns_options
global_conffile
manage_dns
nameservers
dns_searchdomains
dns_options
manage_service
ensure_service
service_name
enable_service
restart_service
dns_notify_daemon
connection_dnsoptions
debug_output
Data type: Boolean
By enabling this, NetworkManager will not use the connections specific dns settings. Instead it will generate a file with the desired dns settings. Those parameters are then the default, even if connection specific settings are present.
Data type: Array[Stdlib::IP::Address::Nosubnet]
An array of the IP addresses for the nameservers for the global setting.
Data type: Array[String[1]]
An array of DNS search domains for the global setting.
Data type: Optional[Variant[Array[String[1]], String]]
A string or an array of strings with resolving options for the global setting. If omitted, no global resolving optios are set.
Data type: Optional[Stdlib::Absolutepath]
The config file for global dns settings. Should be under /etc/NetworkManager/conf.d
Data type: Boolean
Whether we want to manage dns of the primary NetworkManager connection.
Data type: Array[Stdlib::IP::Address::Nosubnet]
An array of the IP addresses of the resolvers to use for the primary NetworkManager connection. At least one address has to be given, but if exactly one address is given, a warning will be omitted.
Data type: Array[String[1], 1]
An array of DNS search domains to use for the primary NetworkManager connection. At least one domain has to be given.
Data type: Optional[Variant[Array[String[1]], String]]
A string or an array of strings with resolving options to use for the primary NetworkManager connection. Please note not to use whitespaces inside the strings, only use comma to separate options inside a string. If not given (or undef), the options are not managed. To remove existing options use an empty string '' as a value.
Data type: Boolean
Whether we want to manage the NetworkManager service.
Data type: Optional[Variant[Boolean, String[1]]]
Whether a service should be running. Valid values are 'stopped', 'running', true, false.
Data type: String[1]
The systemd service name of NetworkManager, usually 'NetworkManager'.
Data type: Boolean
Whether a service should be enabled to start at boot.
Data type: Optional[String[1]]
Specify a restart command manually. If left unspecified, the service will be stopped and then started.
Data type: Boolean
A boolean flag, whether to notify the NetworkManager daemon after DNS changea on the primary NetworkManager connections. In case of a notification the NetworkManager daemon is rewriting /etc/resolv.conf immediately. In this way this resorce can be used to manage /etc/resolv.conf. CAUTION: If you are using another module for managing /etc/resolv.conf (like saz-resolv_conf), this option should be set to false to prevent a Ping-Pong game between those two modules. In this case manage_dns is only intended to ensure a correct /etc/resolv.conf immediately after a reboot.
Default value: true
Data type: Optional[Hash]
A hash for creating networkmanager::dns resources for managing DNS options on different NetworkManager connections. Be sure not to include the primary NetworkManager connection, if manage_dns is true.
Default value: undef
Data type: Boolean
A flag to emit debug information during the puppet agent run
Default value: false
Manages the DNS informations about a particular NetworkManager connection
networkmanager::dns { 'System link':
nameservers => ['8.8.8.8', '8,.8.4.4', '1.1.1.1'],
searchdomains => ['example.com', 'uhu-banane.de', 'uhu-banane.net'],
dns_options => ['timeout:1', 'attempts:2', 'use-vc'],
notify_daemon => true,
}
The following parameters are available in the networkmanager::dns
defined type:
Data type: Array[Stdlib::IP::Address::Nosubnet, 1]
An array of the IP addresses of the resolvers to use. At least one address has to be given, but if exactly one address is given, a warning will be omitted.
Data type: Array[String[1], 1]
An array of DNS search domains. At least one domain has to be given.
Data type: Optional[Variant[Array[String[1]], String]]
A string or an array of strings with resolving options. Please note not to use whitespaces inside the strings, only use comma to separate options inside a string. If not given (or undef), the options are not managed. To remove existing options use an empty string '' as a value.
Default value: undef
Data type: Optional[String[1]]
The name of the NetworkManager connection. If not given, the name of the resource will be used as the name of the connection.
Default value: undef
Data type: Boolean
A boolean flag, whether to notify the NetworkManager daemon after DNS changes. In case of a notification the NetworkManager daemon is rewriting /etc/resolv.conf immediately. In this way this resorce can be used to manage /etc/resolv.conf. CAUTION: If you are using another module for managing /etc/resolv.conf (like saz-resolv_conf), this option should be set to false to prevent a Ping-Pong game between those two modules. In this case this resource is only intended to ensure a correct /etc/resolv.conf immediately after a reboot.
Default value: true
Data type: Optional[Boolean]
A flag to emit debug information during the puppet agent run
Default value: undef