Puppet Class: lsys::resolv

Defined in:
manifests/resolv.pp

Summary

Resolver configuration file management

Overview

Resolver configuration file management

Examples:

include lsys::resolv

Parameters:

  • nameserver (Array[Stdlib::IP::Address]) (defaults to: [])

    Internet addresses of a name servers that the resolver should query. Up to MAXNS (currently 3, see <resolv.h>) name servers may be listed. If there are multiple servers, the resolver library queries them in the order listed. If no nameserver entries are present, the default is to use the name server on the local machine.

  • search (Array[Stdlib::Fqdn]) (defaults to: [])

    Search list for host-name lookup

  • options (Array[Lsys::Resolv::Option]) (defaults to: [])

    Options allows certain internal resolver variables to be modified.

  • sortlist (Array[String, 0, 10]) (defaults to: [])

    This option allows addresses returned by gethostbyname(3) to be sorted. A sortlist is specified by IP-address-netmask pairs.

  • conf_template (String) (defaults to: 'lsys/resolv/resolv.conf.erb')

    Template to use for ‘/etc/resolv.conf`



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'manifests/resolv.pp', line 27

class lsys::resolv (
  Array[Stdlib::IP::Address] $nameserver = [],
  Array[Stdlib::Fqdn] $search = [],
  Array[Lsys::Resolv::Option] $options = [],
  Array[String, 0, 10] $sortlist = [],
  String $conf_template = 'lsys/resolv/resolv.conf.erb',
) {
  file { '/etc/resolv.conf' :
    ensure  => file,
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => template($conf_template),
  }

  # TODO: https://wiki.ubuntuusers.de/systemd/systemd-resolved/
}