Hi everybody

I'd like to simplify my haproxy configuration management by using almost identical configurations for different groups of haproxy installations that use different backends based on string comparision. The only difference in haproxy configuration files of different groups would be that string.

The configuration logic would be something like this (not syntactically correct for haproxy, I know, but should show what I wish to accomplish):

constant = foo # first hostgroup configuration
constant = bar # second hostgroup configuration

# common configuration for all hostgroups
use_backend ha_backend_foo if constant == foo
use_backend ha_backend_bar if constant == bar
...

I wonder how to specify that string and form acl to use in 'use_backend' statement?

Thanks in advance,
Veiko





Reply via email to