Replace hard-coded haproxy/keepalived coupling

We have a variable in hiera which tells us if the keepalived
service is enabled, so use it here.  Without this any deployment
disabling OS::TripleO::Services::Keepalived will fail.

Change-Id: I90faf51881bd05920067c1e1d82baf5d7586af23
Closes-Bug: #1642677
This commit is contained in:
Steven Hardy 2016-11-17 17:37:45 +00:00
parent b8dfe7fb4b
commit 92f9c952d6
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@
# #
# [*keepalived*] # [*keepalived*]
# Whether to configure keepalived to manage the VIPs or not. # Whether to configure keepalived to manage the VIPs or not.
# Defaults to true # Defaults to hiera('keepalived_enabled')
# #
# [*haproxy_service_manage*] # [*haproxy_service_manage*]
# Will be passed as value for service_manage to HAProxy module. # Will be passed as value for service_manage to HAProxy module.
@ -449,7 +449,7 @@
class tripleo::haproxy ( class tripleo::haproxy (
$controller_virtual_ip, $controller_virtual_ip,
$public_virtual_ip, $public_virtual_ip,
$keepalived = true, $keepalived = hiera('keepalived_enabled', false),
$haproxy_service_manage = true, $haproxy_service_manage = true,
$haproxy_global_maxconn = 20480, $haproxy_global_maxconn = 20480,
$haproxy_default_maxconn = 4096, $haproxy_default_maxconn = 4096,
@ -606,7 +606,7 @@ class tripleo::haproxy (
} }
# This code will be removed once we switch undercloud and overcloud to use both haproxy & keepalived roles. # This code will be removed once we switch undercloud and overcloud to use both haproxy & keepalived roles.
if $keepalived { if str2bool($keepalived) {
include ::tripleo::keepalived include ::tripleo::keepalived
# Make sure keepalive starts before haproxy. # Make sure keepalive starts before haproxy.
Class['::keepalived::service'] -> Class['::haproxy'] Class['::keepalived::service'] -> Class['::haproxy']