haproxy-configure¶
HAProxy Configure Task¶
This task handles the configuration and management of HAProxy services. It discovers backend services, generates the HAProxy configuration file, and ensures the service is running with the correct settings.
Requirements¶
- HAProxy must be installed (haproxy-install task)
- Node must have appropriate permissions to:
- Read and write /etc/haproxy/haproxy.cfg
- Manage HAProxy service
- Configure firewall rules
- Modify SELinux contexts (if enabled)
Templates¶
- haproxy-configure.py.tmpl: Main configuration script
- haproxy-setup-firewalld-and-selinux.sh.tmpl: Security configuration
- haproxy-restart.sh.tmpl: Service management
Workflow¶
- Discovers backend services using configured filters
- Generates HAProxy configuration from templates
- Updates firewall and SELinux settings
- Validates and applies the configuration
- Restarts the HAProxy service