updated haproxy state

This commit is contained in:
Paul 2024-01-03 13:29:44 +01:00
parent 3e520f0e10
commit 1737d91e19
2 changed files with 4 additions and 6 deletions

View File

@ -30,7 +30,7 @@ haproxy:
countries:
FR: OK
dbs:
- name: geoip/GeoLite2-City.mmdb
- name: /var/lib/haproxy/geoip/GeoLite2-City.mmdb
url: https://git.paulbsd.com/paulbsd/GeoLite.mmdb/releases/download/2023.03.26/GeoLite2-City.mmdb
lua_max_mem: 1024
peers:
@ -39,7 +39,6 @@ haproxy:
servers:
hosts: []
dirs:
- geoip
- maps
- scripts
- mods
@ -53,7 +52,7 @@ haproxy:
- name: scripts/geoip.lua
lib: false
args:
- /etc/haproxy/geoip/GeoLite2-City.mmdb
- /var/lib/haproxy/geoip/GeoLite2-City.mmdb
- name: scripts/json.lua
lib: true
- name: scripts/collector.lua

View File

@ -40,14 +40,13 @@ haproxy-script-{{ file.name }}:
{% for file in haproxy.config.geoip.dbs %}
haproxy-geoip-{{ file.name }}:
file.managed:
- name: {{ haproxy.config.dir }}/{{ file.name }}
- name: {{ file.name }}
- source: {{ file.url }}
- skip_verify: True
- makedirs: True
- user: {{ haproxy.config.user }}
- group: {{ haproxy.config.group }}
- mode: "0600"
- require:
- file: haproxy-config-geoip-dir
- watch_in:
- service: haproxy-service
{% endfor %}