This repository has been archived by the owner on Aug 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
init.pp
110 lines (98 loc) · 2.23 KB
/
init.pp
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# This class supports the Global File System. It ensures that the
# appropriate files are in the appropriate places and that the necessary
# packages and services are present.
#
# This module is incompatible with the acpid module.
#
# @author Trevor Vaughan <tvaughan@onyxpoint.com>
#
class gfs2 {
include '::network'
file { '/etc/cluster':
ensure => 'directory',
mode => '0750',
owner => 'root',
group => 'root'
}
iptables_rule { 'allow_anycast_multicast':
order => 5,
content => '-s 224.0.0.1 -m addrtype --src-type MULTICAST -j ACCEPT',
require => Package['ricci']
}
package { 'ricci':
ensure => 'latest'
}
# For the SCSI Fence
package { 'sg3_utils': ensure => 'latest' }
if $facts['virtual'] and ( ( $facts['virtual'] == 'xenu' ) or ( $facts['virtual'] == 'xen0' ) ) {
package { [
'kmod-gnbd-xen',
"libvirt.${facts['hardwaremodel']}" ]:
ensure => 'latest'
}
}
package { [
'modcluster',
'rgmanager',
'gfs2-utils',
'lvm2-cluster',
'cman' ]:
ensure => 'latest'
}
service { 'acpid':
ensure => 'stopped',
enable => false,
before => Service['gfs2']
}
service { 'cman':
ensure => 'running',
enable => true,
hasstatus => true,
hasrestart => true,
require => [
Package['modcluster'],
Package['cman'],
Package['ricci']
]
}
service { 'rgmanager':
ensure => 'running',
enable => true,
hasstatus => true,
hasrestart => true,
require => [
Package['rgmanager'],
Service['cman'],
Package['ricci']
]
}
service { 'gfs2':
ensure => 'running',
enable => true,
hasstatus => true,
hasrestart => true,
require => [
Package['gfs2-utils'],
Service['rgmanager'],
Package['ricci']
]
}
service { 'clvmd':
ensure => 'running',
enable => true,
hasstatus => true,
hasrestart => true,
require => [
Package['lvm2-cluster'],
Service['rgmanager'],
Package['ricci']
]
}
service { 'ricci':
ensure => 'running',
enable => true,
hasstatus => true,
hasrestart => true,
require => Package['ricci']
}
}