On Thu, Apr 30, 2015 at 11:49 AM, Veiko Kukk <vk...@xvidservices.com> wrote: > 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
Hi Veiko, The question is how do you set your constant, what piece of information do you use from the traffic or whatever? Then we may help you. Baptiste