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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'modules/dumps/manifests/nfs.pp', line 1
class dumps::nfs(
Hash $clients = undef,
Stdlib::Unixpath $path = undef,
Stdlib::Port $lockd_udp = undef,
Stdlib::Port $lockd_tcp = undef,
Stdlib::Port $mountd_port = undef,
Stdlib::Port $statd_port = undef,
Stdlib::Port $statd_out = undef,
) {
file { '/etc/exports':
mode => '0444',
owner => 'root',
group => 'root',
content => template('dumps/nfs/nfs_exports.erb'),
require => Package['nfs-kernel-server'],
}
ensure_packages(['nfs-kernel-server', 'nfs-common', 'rpcbind'])
service { 'nfs-kernel-server':
ensure => 'running',
require => [
Package['nfs-kernel-server'],
File['/etc/exports'],
],
subscribe => File['/etc/exports'],
}
file { '/etc/default/nfs-common':
mode => '0444',
owner => 'root',
group => 'root',
content => template('dumps/nfs/default-nfs-common.erb'),
require => Package['nfs-kernel-server'],
}
file { '/etc/default/nfs-kernel-server':
mode => '0444',
owner => 'root',
group => 'root',
content => template('dumps/nfs/default-nfs-kernel-server.erb'),
require => Package['nfs-kernel-server'],
}
kmod::options { 'lockd':
options => "nlm_udpport=${lockd_udp} nlm_tcpport=${lockd_tcp}",
}
service { 'rpc-statd':
ensure => 'running',
enable => true,
require => [
File['/etc/default/nfs-common'],
],
subscribe => File['/etc/default/nfs-common'],
}
monitoring::service { 'nfs':
description => 'NFS',
check_command => 'check_tcp!2049',
notes_url => 'https://wikitech.wikimedia.org/wiki/Dumps/Dumpsdata_hosts',
}
}
|