And retire old bacula_client_port param in node
[mirror/dsa-puppet.git] / modules / resolv / manifests / init.pp
1 class resolv(
2   Array[Stdlib::IP::Address] $nameservers = [],
3   Array[String] $searchpaths = [],
4   Array[String] $resolvoptions = [],
5 ) {
6
7   $ns = $facts['unbound'] ? {
8     true    => ['127.0.0.1'],
9     default => $nameservers,
10   }
11
12   file { '/etc/resolv.conf':
13       content => template('resolv/resolv.conf.erb');
14   }
15
16   file { '/etc/dhcp/dhclient-enter-hooks.d/puppet-no-resolvconf':
17     content  => @("EOF"),
18                    make_resolv_conf() {
19                      :
20                    }
21                    | EOF
22     mode => '555',
23     ensure => ($dhclient and $unbound) ? {
24       true     => 'present',
25       false    => 'absent',
26     }
27   }
28 }