diff options
author | Cédric Jeanneret <cedric.jeanneret@camptocamp.com> | 2017-10-04 12:27:25 +0200 |
---|---|---|
committer | Cédric Jeanneret <cedric.jeanneret@camptocamp.com> | 2017-10-07 10:28:08 +0000 |
commit | 3d06318592f61c7a926887e1aeac57478430593f (patch) | |
tree | 04aec9a60e957da08858d545c639c275a350dbe2 | |
parent | 195db7cd8cf8643d2f562bd7c34823033cf479f4 (diff) |
Allow to override HAProxy global options.
You can either append new options or override existing one.
This can be particularly useful in case you want to set your own log
options, for example.
Change-Id: I19005b7e70e624d3b64b6c2ac8eaadfdec3944db
Closes-Bug: 1721246
(cherry picked from commit e62efd0782fd6521893102101daaa21f0cd8a275)
-rw-r--r-- | manifests/haproxy.pp | 7 | ||||
-rw-r--r-- | releasenotes/notes/haproxy_globals_override-7a573da1c8633f01.yaml | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index e9b5b63..9206bb4 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -49,6 +49,10 @@ # The IPv4, IPv6 or filesystem socket path of the syslog server. # Defaults to '/dev/log' # +# [*haproxy_globals_override*] +# HAProxy global option we can append to the default base set in this class. +# If you enter an already existing key, it will override the default. +# # [*haproxy_daemon*] # Should haproxy run in daemon mode or not # Defaults to true @@ -573,6 +577,7 @@ class tripleo::haproxy ( $haproxy_listen_bind_param = [ 'transparent' ], $haproxy_member_options = [ 'check', 'inter 2000', 'rise 2', 'fall 5' ], $haproxy_log_address = '/dev/log', + $haproxy_globals_override = {}, $haproxy_daemon = true, $haproxy_socket_access_level = 'user', $haproxy_stats_user = 'admin', @@ -819,7 +824,7 @@ class tripleo::haproxy ( class { '::haproxy': service_manage => $haproxy_service_manage, - global_options => merge($haproxy_global_options, $haproxy_daemonize), + global_options => merge($haproxy_global_options, $haproxy_daemonize, $haproxy_globals_override), defaults_options => { 'mode' => 'tcp', 'log' => 'global', diff --git a/releasenotes/notes/haproxy_globals_override-7a573da1c8633f01.yaml b/releasenotes/notes/haproxy_globals_override-7a573da1c8633f01.yaml new file mode 100644 index 0000000..a6b6bfb --- /dev/null +++ b/releasenotes/notes/haproxy_globals_override-7a573da1c8633f01.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + This new parameter allows to set/override HAProxy global + options in a convenient way. |