ansible/roles/loadbalancer/templates/nginx.conf.j2

17 lines
292 B
Django/Jinja

include /etc/nginx/modules-enabled/*.conf;
events {}
stream {
upstream k3s_servers {
{% for ip in k3s_server_ips %}
server {{ ip }}:{{k3s.loadbalancer.default_port}};
{% endfor %}
}
server {
listen {{k3s.loadbalancer.default_port}};
proxy_pass k3s_servers;
}
}