summaryrefslogtreecommitdiff
path: root/puppet/modules/site_config/manifests/resolvconf.pp
blob: b70dfa1ce87570a211ef123bd7acbe608815e5a5 (plain)
1
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
31
32
33
34
35
36
37
38
class site_config::resolvconf {

  # bind9
  package { 'bind9':
    ensure => installed,
  }

  service { 'bind9':
    ensure => running,
    require => Package['bind9'],
  }

  file { '/etc/default/bind9':
    source    => 'puppet:///modules/site_config/bind9',
    require => Package['bind9'],
    notify  => Service['bind9'], 
  }

  file { '/etc/bind/named.options':
    source => 'puppet:///modules/site_config/named.options',
    require => Package['bind9'],
    notify  => Service['bind9'], 
  }



  $domain_hash = hiera('domain')
  $domain_public = $domain_hash['public']

  # 127.0.0.1:      caching-only local bind
  # 87.118.100.175: http://server.privacyfoundation.de
  # 62.141.58.13:   http://www.privacyfoundation.ch/de/service/server.html
  class { '::resolvconf':
    domain      => $domain_public,
    search      => $domain_public,
    nameservers => [ '127.0.0.1', '87.118.100.175', '62.141.58.13' ]
  }
}