1
0
Fork 0

Add server.ip in whitelist

This commit is contained in:
Florian RICHER 2023-11-11 09:45:57 +01:00
parent afe60bbf47
commit 6e78f02cd4
3 changed files with 13 additions and 1 deletions

View file

@ -14,6 +14,9 @@ server:
port: 22
peers: test
private_network:
extra_ips_whitelist: []
acme:
email: test@test.fr
debug: true

View file

@ -12,9 +12,14 @@
loop:
- { src: 'docker-compose.yml', dest: 'docker-compose.yml' }
- { src: 'config/traefik.yml', dest: 'config/traefik.yml' }
- { src: 'config/dynamic_conf.yml', dest: 'config/dynamic_conf.yml' }
register: traefik_copy_templates_results
# Avoid restart docker if dynamic_conf updated
- name: Copy dynamic_conf conf
ansible.builtin.template:
src: "config/dynamic_conf.yml"
dest: "traefik/config/dynamic_conf.yml"
- name: Update and restart container
community.docker.docker_compose:
project_src: traefik

View file

@ -4,6 +4,10 @@ http:
ipWhiteList:
sourceRange:
- "{{ server.vpn.subnet }}"
- "{{ server.ip }}"
{% for ip in private_network.extra_ips_whitelist %}
- "{{ ip }}"
{% endfor %}
routers:
octoPrint-secure:
entryPoints: