On 2019/3/8 08:17, Philipp Kolmann wrote: > Hi, > > I have ACLs for Source-IPs for Admins for several services. These ACLs > are identical for multiple listener-sections. > > Would it be possible to have a file with several acl snipplets and > source that at the proper section of the config file multiple times? > I haven't found anything in the docs that would make this possible. > > My wished Setup: > > admin_acl.conf: > > acl is_admin src 10.0.0.1 > acl is_admin src 10.0.0.2 > acl is_admin src 10.0.0.3 > acl is_admin src 10.0.0.4 > > > haproxy.cfg: > > listen service1 > bind 10.1.0.10:80 > include admin_acl.conf > > .... more parameters ... > > > listen service2 > bind 10.1.0.20:80 > include admin_acl.conf > > .... more parameters ... > > > listen service3 > bind 10.1.0.30:80 > include admin_acl.conf > > .... more parameters ... > > > The admin_acl needs to be maintained only once and can be used > multiple times. > > Is this already possible? Could such an include option be made for the > config files? > > thanks > Philipp >
You can use external files in two cases. See the following blog articles: https://www.haproxy.com/blog/introduction-to-haproxy-acls/ (search for "acl file") https://www.haproxy.com/blog/introduction-to-haproxy-maps/ -Patrick

