-
-
Notifications
You must be signed in to change notification settings - Fork 161
/
Copy pathparams.pp
111 lines (104 loc) · 3.84 KB
/
params.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
111
class corosync::params {
$enable_secauth = true
$authkey_source = 'file'
$authkey = '/etc/puppet/ssl/certs/ca.pem'
$threads = undef
$port = '5405'
$bind_address = $::ipaddress
$multicast_address = 'UNSET'
$unicast_addresses = 'UNSET'
$force_online = false
$check_standby = false
$log_timestamp = false
$log_file = true
$log_file_name = undef
$debug = false
$log_stderr = true
$syslog_priority = 'info'
$log_function_name = false
$rrp_mode = undef
$netmtu = undef
$ttl = false
$vsftype = undef
$token = undef
$token_retransmits_before_loss_const = undef
$votequorum_expected_votes = false
$cluster_name = undef
$join = undef
$consensus = undef
$max_messages = undef
$package_corosync = true
$package_pacemaker = true
$version_corosync = 'present'
$version_crmsh = 'present'
$version_pacemaker = 'present'
$version_pcs = 'present'
$compatibility = undef
$enable_corosync_service = true
$enable_pacemaker_service = true
$enable_pcsd_service = true
case $::osfamily {
'RedHat': {
$package_crmsh = false
$package_pcs = true
$set_votequorum = true
if versioncmp($::operatingsystemrelease, '7') >= 0 {
$manage_pacemaker_service = true
$test_corosync_config = true
} else {
$manage_pacemaker_service = false
$test_corosync_config = false
}
$package_install_options = undef
}
'Debian': {
$package_crmsh = true
$package_pcs = false
case $::operatingsystem {
'Ubuntu': {
if versioncmp($::operatingsystemrelease, '14.04') >= 0 {
$set_votequorum = true
$manage_pacemaker_service = true
if versioncmp($::operatingsystemrelease, '16.04') >= 0 {
$test_corosync_config = true
} else {
#FIXME should be moved in another place
file {'/etc/default/cman':
ensure => present,
content => template('corosync/cman.erb'),
}
$test_corosync_config = false
}
} else {
$set_votequorum = false
$manage_pacemaker_service = false
$test_corosync_config = false
}
$package_install_options = undef
}
'Debian': {
if versioncmp($::operatingsystemrelease, '8') >= 0 {
$set_votequorum = true
$manage_pacemaker_service = true
$package_install_options = ['-t', 'jessie-backports']
$test_corosync_config = true
} else {
$set_votequorum = false
$manage_pacemaker_service = false
$package_install_options = undef
$test_corosync_config = false
}
}
default : {
$set_votequorum = false
$manage_pacemaker_service = false
$package_install_options = undef
$test_corosync_config = false
}
}
}
default: {
fail("Unsupported operating system: ${::operatingsystem}")
}
}
}