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 - domains
- redirects - redirects
- vhosts - vhosts
acme: false
config: config:
dir: /etc/haproxy dir: /etc/haproxy
configfile: haproxy.cfg configfile: haproxy.cfg

View File

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

View File

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