summaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/haproxy.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/haproxy.pp')
-rw-r--r--manifests/profile/base/haproxy.pp14
1 files changed, 14 insertions, 0 deletions
diff --git a/manifests/profile/base/haproxy.pp b/manifests/profile/base/haproxy.pp
index 4f2f850..68ff3e4 100644
--- a/manifests/profile/base/haproxy.pp
+++ b/manifests/profile/base/haproxy.pp
@@ -82,6 +82,20 @@ class tripleo::profile::base::haproxy (
}
include ::tripleo::haproxy
+
+ unless hiera('tripleo::haproxy::haproxy_service_manage', true) {
+ # Reload HAProxy configuration if the haproxy class has refreshed or any
+ # HAProxy frontend endpoint has changed.
+ exec { 'haproxy-reload':
+ command => 'systemctl reload haproxy',
+ path => ['/usr/bin', '/usr/sbin'],
+ refreshonly => true,
+ onlyif => 'pcs property | grep -q "maintenance-mode.*true"',
+ subscribe => Class['::haproxy']
+ }
+ Haproxy::Listen<||> ~> Exec['haproxy-reload']
+ Haproxy::Balancermember<||> ~> Exec['haproxy-reload']
+ }
}
}