updated haproxy state

This commit is contained in:
Paul 2023-02-10 13:47:00 +01:00
parent 2c301c8e9e
commit ba8e4a8d26
3 changed files with 11 additions and 5 deletions

View File

@ -8,6 +8,7 @@ haproxy:
- domains
- redirects
- vhosts
acme: false
config:
dir: /etc/haproxy
configfile: haproxy.cfg

View File

@ -1,6 +1,9 @@
---
{%- from "haproxy/map.jinja" import haproxy with context %}
include:
{%- if haproxy.acme %}
- acme
{%- endif %}
- .install
- .config
- .service

View File

@ -1,14 +1,16 @@
{%- import_yaml "haproxy/defaults.yaml" as defaults -%}
{%- set haproxy = salt['pillar.get']('haproxy', default=defaults.haproxy, merge=True) -%}
{%- set haproxy = salt['pillar.get']('haproxy',
default=defaults.haproxy,
merge=True) -%}
{%- set users = salt['pillar.get']('htpasswds') -%}
{%- set net = salt['pillar.get']('net') -%}
{% set peers = salt['mine.get'](
tgt='G@lb:true',
fun='internal_ip_addrs',
tgt_type='compound') %}
tgt='G@lb:true',
fun='internal_ip_addrs',
tgt_type='compound') %}
{% set peers_ip = [] %}
{%- for k,v in peers.items() %}