ansible/roles/loadbalancer/tasks/configuration.yml

21 lines
430 B
YAML
Raw Normal View History

---
- name: Template the nginx config file with dynamic upstreams
ansible.builtin.template:
src: templates/nginx.conf.j2
dest: "{{ nginx_config_path }}"
owner: root
group: root
mode: "0644"
become: true
notify:
- Restart nginx
vars:
k3s_server_ips: "{{ k3s.server.ips }}"
- name: Enable nginx
ansible.builtin.systemd:
name: nginx
daemon_reload: true
enabled: true
become: true