This commit is contained in:
parent
80f9d31405
commit
c1a7f16773
@ -30,9 +30,6 @@ haproxy:
|
||||
enabled: true
|
||||
countries:
|
||||
FR: OK
|
||||
dbs:
|
||||
GeoLite2-City.mmdb:
|
||||
url: https://git.paulbsd.com/paulbsd/GeoLite.mmdb/releases/download/2023.03.26/GeoLite2-City.mmdb
|
||||
lua_max_mem: 1024
|
||||
peers:
|
||||
hosts: []
|
||||
@ -55,7 +52,7 @@ haproxy:
|
||||
path: scripts/geoip.lua
|
||||
lib: false
|
||||
args:
|
||||
- /var/lib/haproxy/geoip/GeoLite2-City.mmdb
|
||||
- /usr/share/geoip/GeoLite2-City.mmdb
|
||||
json:
|
||||
path: scripts/json.lua
|
||||
lib: true
|
||||
|
@ -3,6 +3,9 @@
|
||||
include:
|
||||
{%- if haproxy.acme %}
|
||||
- acme
|
||||
{%- endif %}
|
||||
{%- if haproxy.config.geoip.enabled %}
|
||||
- geoip
|
||||
{%- endif %}
|
||||
- .install
|
||||
- .config
|
||||
|
@ -37,20 +37,6 @@ haproxy-script-{{ script }}:
|
||||
- service: haproxy-service
|
||||
{% endfor %}
|
||||
|
||||
{% for dbname, params in haproxy.config.geoip.dbs.items() %}
|
||||
haproxy-geoip-{{ dbname }}:
|
||||
file.managed:
|
||||
- name: /var/lib/haproxy/geoip/{{ dbname }}
|
||||
- source: {{ params.url }}
|
||||
- skip_verify: True
|
||||
- makedirs: True
|
||||
- user: {{ haproxy.config.user }}
|
||||
- group: {{ haproxy.config.group }}
|
||||
- mode: "0600"
|
||||
- watch_in:
|
||||
- service: haproxy-service
|
||||
{% endfor %}
|
||||
|
||||
haproxy-hatop-download:
|
||||
file.managed:
|
||||
- name: /usr/bin/hatop
|
||||
|
Loading…
Reference in New Issue
Block a user