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
39
40
41
42
43
44
45
46
47
|
# File 'manifests/applications/bind.pp', line 2
class librenms::applications::bind (
Boolean $enabled = true,
String $rndc = '/usr/sbin/rndc',
Boolean $call_rndc = true,
String $stats_file = '/var/run/named/stats',
Boolean $agent = false,
Boolean $zero_stats = false,
) inherits librenms::params {
$snmpd_dir = $librenms::params::snmpd_dir
ensure_packages([$librenms::params::perl_readbackwards_package], {ensure => present})
file {$stats_file:
ensure => 'present',
mode => '0644',
owner => $librenms::params::bind_user,
group => $librenms::params::bind_group,
notify => Service['bind9'],
}
if $enabled {
$file_existance = 'present'
} else {
$file_existance = 'absent'
}
file {"${snmpd_dir}/bind.config":
ensure => $file_existance,
owner => 'root',
group => 'root',
mode => '0755',
content => template('librenms/bind.config.erb'),
}
create_resources(librenms::fetch, {
'bind' => {
use => $enabled,
}})
librenms::snmpd{'bind':
use => $enabled,
script => 'bind'
}
}
|