summaryrefslogtreecommitdiffstats
path: root/scripts/haproxy
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:48:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:48:59 +0000
commitd835b2cae8abc71958b69362162e6a70c3d7ef63 (patch)
tree81052e3d2ce3e1bcda085f73d925e9d6257dec15 /scripts/haproxy
parentInitial commit. (diff)
downloadcrmsh-upstream.tar.xz
crmsh-upstream.zip
Adding upstream version 4.6.0.upstream/4.6.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/haproxy')
-rw-r--r--scripts/haproxy/haproxy.cfg13
-rw-r--r--scripts/haproxy/main.yml37
2 files changed, 50 insertions, 0 deletions
diff --git a/scripts/haproxy/haproxy.cfg b/scripts/haproxy/haproxy.cfg
new file mode 100644
index 0000000..50141a2
--- /dev/null
+++ b/scripts/haproxy/haproxy.cfg
@@ -0,0 +1,13 @@
+global
+ maxconn 256
+ daemon
+
+defaults
+ mode http
+ timeout connect 5000ms
+ timeout client 50000ms
+ timeout server 50000ms
+
+listen http-in
+ bind 0.0.0.0:80
+ stats enable
diff --git a/scripts/haproxy/main.yml b/scripts/haproxy/main.yml
new file mode 100644
index 0000000..3e784c6
--- /dev/null
+++ b/scripts/haproxy/main.yml
@@ -0,0 +1,37 @@
+version: 2.2
+category: Server
+shortdesc: HAProxy
+longdesc: |
+ HAProxy is a free, very fast and reliable solution offering
+ high availability, load balancing, and proxying for TCP and
+ HTTP-based applications. It is particularly suited for very
+ high traffic web sites and powers quite a number of the
+ world's most visited ones.
+
+ NOTE: Installs a basic haproxy.cfg configuration file.
+ This will overwrite any existing haproxy.cfg.
+
+include:
+ - agent: systemd:haproxy
+ name: haproxy
+ ops: |
+ op monitor interval=10s
+
+parameters:
+ - name: install
+ type: boolean
+ value: false
+ shortdesc: Install and configure HAProxy packages
+
+actions:
+ - install: haproxy
+ nodes: all
+ when: install
+ - service: "haproxy:disable"
+ nodes: all
+ when: install
+ - copy: haproxy.cfg
+ to: /etc/haproxy/haproxy.cfg
+ nodes: all
+ when: install
+ - include: haproxy