From 6abe60186260125ec3af68d335a39b53687b3b1e Mon Sep 17 00:00:00 2001 From: Asara Date: Sat, 26 Mar 2022 18:06:51 -0400 Subject: [PATCH] Add airsonic --- ansible/roles/docker/tasks/main.yml | 2 -- ansible/roles/haproxy/templates/haproxy.cfg.j2 | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml index f391c12..6831d3a 100644 --- a/ansible/roles/docker/tasks/main.yml +++ b/ansible/roles/docker/tasks/main.yml @@ -21,8 +21,6 @@ state: present mode: 0644 -- name: update apt cache - apt: - name: install docker-ce apt: state: present diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 index 6e37b33..e736118 100644 --- a/ansible/roles/haproxy/templates/haproxy.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -32,6 +32,11 @@ defaults errorfile 503 /etc/haproxy/errors/503.http errorfile 504 /etc/haproxy/errors/504.http +frontend fe_tcp + mode tcp + bind :8000 + default_backend be_airsonic + frontend fe_default mode http bind :443 ssl crt /etc/haproxy/certs/ alpn h2,http/1.1 @@ -51,6 +56,11 @@ backend be_{{ domain.name }} server-template {{ domain.name }} 1 _{{ domain.name }}._tcp.service.masked.name resolvers consul resolve-opts allow-dup-ip resolve-prefer ipv4 check {% endfor %} + +backend be_airsonic + balance leastconn + server airsonic 192.168.0.12:8000 + resolvers consul nameserver consul 127.0.0.1:8600 accepted_payload_size 8192