Puppet Class: psick::dns::resolver
- Defined in:
- manifests/dns/resolver.pp
Overview
This class manages /etc/resolv.conf
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'manifests/dns/resolver.pp', line 2
class psick::dns::resolver (
Array $nameservers = ['8.8.8.8','8.8.4.4'],
Optional[Array] $options = undef,
Optional[Array] $search = undef,
Optional[String] $domain = undef,
Optional[Array] $sortlist = undef,
String $resolver_path = '/etc/resolv.conf',
String $resolver_template = 'psick/dns/resolver/resolv.conf.erb',
Boolean $manage = $psick::manage,
Boolean $noop_manage = $psick::noop_manage,
Boolean $noop_value = $psick::noop_value,
) {
if $manage {
if $noop_manage {
noop($noop_value)
}
if $facts['virtual'] != 'docker' {
file { $resolver_path:
ensure => file,
content => template($resolver_template),
owner => 'root',
group => 'root',
mode => '0644',
}
}
}
}
|