diff --git a/states/haproxy/config.sls b/states/haproxy/config.sls index fbb1268..ae25220 100644 --- a/states/haproxy/config.sls +++ b/states/haproxy/config.sls @@ -1,6 +1,6 @@ --- {%- from "haproxy/map.jinja" import haproxy with context %} -{% for map in haproxy.maps %} +{% for map in haproxy.config.maps %} haproxy-maps-{{ map }}: file.managed: - name: {{ haproxy.config.dir }}/maps/{{ map }} @@ -13,7 +13,7 @@ haproxy-maps-{{ map }}: - service: haproxy-service {% endfor %} -{% for static in haproxy.static %} +{% for static in haproxy.config.static %} haproxy-static-{{ static }}: file.managed: - name: {{ haproxy.config.dir }}/static/{{ static }} diff --git a/states/haproxy/defaults.yaml b/states/haproxy/defaults.yaml index f3c36aa..5bc3d22 100644 --- a/states/haproxy/defaults.yaml +++ b/states/haproxy/defaults.yaml @@ -9,14 +9,6 @@ haproxy: - libcurl4-openssl-dev - libmaxminddb-dev - libjansson-dev - maps: - - access - - allowhttp - - countries - - domains - - redirects - - ua - - vhosts acme: false hatop: fetchurl: https://github.com/jhunt/hatop/releases/download @@ -44,6 +36,14 @@ haproxy: - static static: - security.txt + maps: + - access + - allowhttp + - countries + - domains + - redirects + - ua + - vhosts scripts: haproxy: path: mods/haproxy.c