Commit Graph

6 Commits (00acc54402d68f10441af9635342a36b9f9c5119)

Author SHA1 Message Date
Dustin 3ca94d2bf4 r/haproxy: Enable Prometheus metrics
HAProxy can export stats in Prometheus format, but this requires
special configuration of a dedicated front-end.  To support this, the
_haproxy_ Ansible role now has a pair of variables,
`haproxy_enable_stats` and `haproxy_stats_port`, which control whether
or not the stats front-end is enabled, and if so, what port it listens
on.  Note that on Fedora with the default SELinux policy, the port must
be labelled either `http_port_t` or `http_cache_port_t`.
2024-11-05 06:23:49 -06:00
Dustin 7b6e0bd100 r/haproxy: Support configuring resolvers
HAProxy uses a special configuration block, `resolvers`, to specify
how it should look up names in DNS.  This configuration is used for
e.g. dynamically discovering backend servers via DNS A or SRV records.
Since resolvers are global, they need to be specified in the global
configuration file, rather than a per-application drop-in.

We will use this functionality for the ACME HTTP-01 challenge solver
for Samba AD domain controllers.
2024-06-12 18:29:56 -05:00
Dustin 29ef364fab r/haproxy: Clean up for modern haproxy versions
The current version of *haproxy* packaged in Fedora already enables
configuration via fragments in a drop-in directory, though it uses
a different path by default.  I still like separating the global
configuration from the defaults, though, and keeping the main
`haproxy.cfg` file empty.
2024-06-12 18:28:16 -05:00
Dustin dd0892e208 roles/haproxy: Fix undefined var on Fedora hosts
the `haproxy_ssl_default_bind_options` variable is not defined for
machines running Fedora, because this parameter is not used in the
default configuration file there.
2020-03-03 19:27:19 -06:00
Dustin 909c8e7a03 roles/haproxy: Add support for Debian hosts
Debian does not support system-wide SSL cipher suite profiles of course,
so these options need to be specified explicitly when deploying HAProxy
on Debian-based machines.
2019-03-22 09:29:56 -05:00
Dustin 235468a71c roles/haproxy: Basic setup for HAproxy
The *haproxy* installs HAproxy and sets up basic configuration for it.
It configures the systemd unit to launch the service with the `-f
/etc/haproxy` arguments, which will cause it to load all files from the
`/etc/haproxy` directory, instead of just `/etc/haproxy/haproxy.cfg`.
This will allow other roles to add frontend and backend configuration by
adding additional files to this directory.
2018-06-12 22:31:15 -05:00