From 37f0c004c5a80653d25a71a0292e26bad73ad3e1 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Tue, 9 Jan 2018 10:59:29 +0100 Subject: [PATCH] Let haproxy_defaults be overridable Add the haproxy_defaults_override parameter so the defaults_options in haproxy are overridable. Tested by adding the following yaml to the deployment: parameter_defaults: ExtraConfig: tripleo::haproxy::haproxy_defaults_override: retries: 7 Observed that haproxy.conf contained the following (retries defaults to 3): defaults retries 7 Change-Id: I52b8f528e334e4d243ac7f506b9f293dab9f478d Closes-Bug: #1732176 --- manifests/haproxy.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index 39182e3f8..28f964404 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -57,6 +57,12 @@ # [*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. +# Defaults to {} +# +# [*haproxy_defaults_override*] +# HAProxy defaults option we can append to the default base set in this class. +# If you enter an already existing key, it will override the default. +# Defaults to {} # # [*haproxy_daemon*] # Should haproxy run in daemon mode or not @@ -596,6 +602,7 @@ class tripleo::haproxy ( $haproxy_log_address = '/dev/log', $activate_httplog = false, $haproxy_globals_override = {}, + $haproxy_defaults_override = {}, $haproxy_daemon = true, $haproxy_socket_access_level = 'user', $haproxy_stats_user = 'admin', @@ -863,7 +870,7 @@ class tripleo::haproxy ( class { '::haproxy': service_manage => $haproxy_service_manage, global_options => merge($haproxy_global_options, $haproxy_daemonize, $haproxy_globals_override), - defaults_options => merge($haproxy_defaults_options, $httplog), + defaults_options => merge($haproxy_defaults_options, $httplog, $haproxy_defaults_override), }