ansible-role-traefik/templates/conf.d/50-easy-tcp.toml

18 lines
404 B
TOML

{% for r in traefik_tcp_proxy %}
#---------------------------------
# {{ r.name }}: {{ r.rule }}
#---------------------------------
[tcp.routers.{{r.name}}]
entryPoints = {{r.entryPoints}}
rule = "{{r.rule }}"
service = "{{r.name}}"
[tcp.services.{{r.name}}.loadBalancer]
{% for addr in r.addresses %}
[[tcp.services.{{r.name}}.loadBalancer.servers]]
address = "{{addr.to}}"
{% endfor %}
{% endfor %}