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

View File

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