diff --git a/doc/puppet_defined_types/cd_haproxy_3A_3Aserver_3A_3Aproxy.html b/doc/puppet_defined_types/cd_haproxy_3A_3Aserver_3A_3Aproxy.html index 648d009..139f552 100644 --- a/doc/puppet_defined_types/cd_haproxy_3A_3Aserver_3A_3Aproxy.html +++ b/doc/puppet_defined_types/cd_haproxy_3A_3Aserver_3A_3Aproxy.html @@ -418,6 +418,19 @@ instance configuration.
+# File 'manifests/server/proxy.pp', line 24
@@ -511,6 +538,8 @@ define cd_haproxy::server::proxy (
$be_option = '',
$fe_tcp_request = '',
$fe_http_request = '',
+ $backend_configs = [],
+
) {
@@ -534,18 +563,30 @@ define cd_haproxy::server::proxy (
# create frontend section
concat::fragment { "frontend_${name}":
- target => $hy_main_config,
- content => template($hy_frontendrule),
- order => $frontend_order,
+ target => $hy_main_config,
+ content => template($hy_frontendrule),
+ order => $frontend_order,
}
- # create backend section
- concat::fragment { "backend_${name}":
- target => $hy_main_config,
- content => template($hy_backendrule),
- order => $backend_order,
+
+ # Create backend sections dynamically based on $backend_configs
+ $backend_configs.each |$index, $backend_config| {
+ concat::fragment { "backend_${name}_${index}":
+ target => $hy_main_config,
+ content => template($hy_backendrule),
+ order => $backend_order,
+ # Use variables from the backend config for each backend
+ variables => $backend_config,
+ }
}
+# # create backend section
+# concat::fragment { "backend_${name}":
+# target => $hy_main_config,
+# content => template($hy_backendrule),
+# order => $backend_order,
+# }
+
}