diff options
author | 2016-09-07 00:49:55 +0000 | |
---|---|---|
committer | 2016-09-07 00:49:55 +0000 | |
commit | ee31e5cd9dcaaf5e732b08beb8acf11d63c6828e (patch) | |
tree | 591670aa7a3672f3c6adbf033db6e864feebb45d /manifests/keepalived.pp | |
parent | 17f4a4f8e4d80eac4034bc44483d07945724b295 (diff) | |
parent | 16b2c0ab0e27d1fdbfe06424c4e67f78dfc161d1 (diff) |
Merge "Manage Redis VIP when deploying with keepalived"
Diffstat (limited to 'manifests/keepalived.pp')
-rw-r--r-- | manifests/keepalived.pp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/manifests/keepalived.pp b/manifests/keepalived.pp index 45d772e..c0fb3ef 100644 --- a/manifests/keepalived.pp +++ b/manifests/keepalived.pp @@ -54,6 +54,11 @@ # A string. # Defaults to false # +# [*redis_virtual_ip*] +# Virtual IP on the redis service. +# A string. +# Defaults to false +# class tripleo::keepalived ( $controller_virtual_ip, $control_virtual_interface, @@ -62,6 +67,7 @@ class tripleo::keepalived ( $internal_api_virtual_ip = false, $storage_virtual_ip = false, $storage_mgmt_virtual_ip = false, + $redis_virtual_ip = false, ) { case $::osfamily { @@ -141,4 +147,16 @@ class tripleo::keepalived ( } } + if $redis_virtual_ip and $redis_virtual_ip != $controller_virtual_ip { + $redis_virtual_interface = interface_for_ip($redis_virtual_ip) + # KEEPALIVE STORAGE MANAGEMENT NETWORK + keepalived::instance { '56': + interface => $redis_virtual_interface, + virtual_ips => [join([$redis_virtual_ip, ' dev ', $redis_virtual_interface])], + state => 'MASTER', + track_script => ['haproxy'], + priority => 101, + } + } + } |