|
1 | 1 | # dns
|
2 | 2 | class dns {
|
3 |
| - include prometheus::exporter::gdnsd |
| 3 | + # include prometheus::exporter::gdnsd |
4 | 4 |
|
5 |
| - package { 'gdnsd': |
| 5 | + package { 'bind9': |
| 6 | + ensure => installed, |
| 7 | + } |
| 8 | + package { 'bind9-utils': |
6 | 9 | ensure => installed,
|
7 | 10 | }
|
8 | 11 |
|
9 | 12 | git::clone { 'dns':
|
10 | 13 | ensure => latest,
|
11 |
| - directory => '/etc/gdnsd', |
| 14 | + directory => '/etc/bind', |
12 | 15 | origin => 'https://github.com/miraheze/dns',
|
13 | 16 | owner => 'root',
|
14 | 17 | group => 'root',
|
15 |
| - before => Package['gdnsd'], |
16 |
| - notify => Exec['gdnsd-syntax'], |
| 18 | + before => Package['bind9'], |
| 19 | + notify => Exec['bind-syntax'], |
17 | 20 | }
|
18 | 21 |
|
19 |
| - file { '/usr/share/GeoIP/GeoLite2-Country.mmdb': |
| 22 | + file { '/usr/local/bin/check-dns-zones': |
20 | 23 | ensure => present,
|
21 |
| - source => 'puppet:///private/geoip/GeoLite2-Country.mmdb', |
22 |
| - mode => '0444', |
23 |
| - notify => Exec['gdnsd-syntax'], |
| 24 | + owner => 'root', |
| 25 | + group => 'root', |
| 26 | + source => 'puppet:///modules/dns/check-dns-zones.py', |
| 27 | + mode => '0555', |
24 | 28 | }
|
25 | 29 |
|
26 |
| - exec { 'gdnsd-syntax': |
27 |
| - command => '/usr/sbin/gdnsd checkconf', |
28 |
| - notify => Service['gdnsd'], |
| 30 | + exec { 'bind-syntax': |
| 31 | + command => '/usr/local/bin/check-dns-zones', |
| 32 | + notify => Service['named'], |
29 | 33 | refreshonly => true,
|
30 | 34 | }
|
31 | 35 |
|
32 |
| - service { 'gdnsd': |
| 36 | + service { 'named': |
33 | 37 | ensure => running,
|
34 | 38 | hasrestart => true,
|
35 | 39 | hasstatus => true,
|
36 |
| - require => [ Package['gdnsd'], Exec['gdnsd-syntax'] ], |
37 |
| - } |
38 |
| - |
39 |
| - file { '/usr/lib/nagios/plugins/check_gdnsd_datacenters': |
40 |
| - ensure => present, |
41 |
| - source => 'puppet:///modules/dns/check_gdnsd_datacenters.py', |
42 |
| - mode => '0755', |
| 40 | + require => [ Package['bind9'], Exec['bind-syntax'] ], |
43 | 41 | }
|
44 | 42 |
|
45 | 43 | if ( $facts['networking']['interfaces']['ens19'] and $facts['networking']['interfaces']['ens18'] ) {
|
|
57 | 55 | host => 'wikitide.net',
|
58 | 56 | },
|
59 | 57 | }
|
60 |
| - |
61 |
| - monitoring::nrpe { 'GDNSD Datacenters': |
62 |
| - command => '/usr/bin/sudo /usr/lib/nagios/plugins/check_gdnsd_datacenters' |
63 |
| - } |
64 | 58 | }
|
0 commit comments