Menu

Automating HAProxy 3.3 and Data Plane API Deployment with Ansible
πŸ“°

Automating HAProxy 3.3 and Data Plane API Deployment with Ansible

DEV Community: ansibleΒ·PatrickΒ·10 days ago
#yP25Ikwp
#devtoansible#devto#dev#haproxy#name
Long article (2315 words) β€” no AI summary yet.
Reading 0:00
15s threshold

HAProxy is one of the most powerful open-source load balancers, widely used for its reliability, security, and performance. The Data Plane API adds a REST API to manage its configuration. Installing both by hand means a repository, a pinned package, a binary from GitHub, two config files and a systemd unit, on every load balancer.

This post walks through one Ansible playbook that does all of that, from the official HAProxy repositories, and gives the same result on every run.

Why Ansible for this?

Repeatable - Every load balancer gets the same packages, files and service

Version control - Change haproxy_version or dataplaneapi_version and rerun to upgrade

Idempotent - A second run reports no changes, so you can run it at any time

When to use it

Use it for more than one load balancer, or for one you want to rebuild quickly.

Skip it for a single throwaway test box; the manual steps in the Data Plane API post are quicker.

Architecture Overview

Component Comes from Job

HAProxy vbernat/haproxy-X.Y PPA…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.