Newer
Older
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
#
# Portmap service for Sun RPC. Needed on systems providing RPC services, such
# as NFS servers, and occasionally for other reasons.
# This class intentionally does not add iptables rules. You should add with
# server-specific iptables rules to allow only specific sites to talk to port
# 111.
class base::portmap {
case $::operatingsystem {
'redhat': {
include base::xinetd
case $::lsbdistcodename {
'santiago': {
package { 'rpcbind': ensure => present }
service { 'rpcbind': ensure => running }
}
default: {
package { 'portmap': ensure => present }
# Ensure service is running. Also notify xinetd in case the
# services need to be re-registered with the portmap.
service { 'portmap':
ensure => running,
enable => true,
hasstatus => true,
require => Package['portmap'],
restart => '/etc/init.d/portmap restart',
notify => Service['xinetd'],
}
}# rhel4/5
}
}
'debian': {
package { 'portmap': ensure => present }
service{ 'portmap':
ensure => running,
enable => true,
hasstatus => false,
status => 'pidof portmap',
require => Package['portmap'],
restart => '/etc/init.d/portmap restart',
}
}
# Ubuntu 11.10 switched to "rpcbind" like EL6
'ubuntu': {
package { 'rpcbind': ensure => present }
service { 'portmap': ensure => running }
}
}
}