From 714cdecd0a7bbf4aa402221e62dff335146d0bd6 Mon Sep 17 00:00:00 2001 From: strNophix Date: Wed, 23 Feb 2022 15:52:06 +0100 Subject: [PATCH] WIP loadbalancer config template --- playbooks/templates/loadbalancer.cfg.j2 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 playbooks/templates/loadbalancer.cfg.j2 diff --git a/playbooks/templates/loadbalancer.cfg.j2 b/playbooks/templates/loadbalancer.cfg.j2 new file mode 100644 index 0000000..dd67fe0 --- /dev/null +++ b/playbooks/templates/loadbalancer.cfg.j2 @@ -0,0 +1,15 @@ +http { + upstream app { + {% for host in ip %} + server {{ host.ip }}; + {% endfor %} + } + + server { + listen 80; + + location / { + proxy_pass http://app; + } + } +} \ No newline at end of file