/
keepalived.pp
29 lines (26 loc) · 1.21 KB
/
keepalived.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
# == Class: contrail::profile::keepalived
# The puppet module to set up keepalived for contrail
#
# === Parameters:
#
# [*enable_module*]
# Flag to indicate if profile is enabled. If true, the module is invoked.
# (optional) - Defaults to true.
#
class contrail::profile::keepalived (
$enable_module = $::contrail::params::enable_keepalived,
$host_roles = $::contrail::params::host_roles
) {
if ($enable_module and ('config' in $host_roles or 'openstack' in $host_roles)) {
contrail::lib::report_status { 'keepalived_started': state => 'keepalived_started' }
-> class {'::contrail::keepalived' : }
-> contrail::lib::report_status { 'keepalived_completed': state => 'keepalived_completed' }
} elsif (((!('config' in $host_roles)) and ($contrail_roles['config'] == true)) or
((!('openstack' in $host_roles)) and ($contrail_roles['openstack'] == true))
) {
notify { 'uninstalling keepalived':; }
contrail::lib::report_status { 'uinstall_keepalived_started': state => 'uninstall_keepalived_started' }
-> class {'::contrail::uninstall_keepalived' : }
-> contrail::lib::report_status { 'uninstall_keepalived_completed': state => 'uninstall_keepalived_completed' }
}
}