2024-09-19 23:10:00 +02:00
|
|
|
---
|
|
|
|
- name: Template the nginx config file with dynamic upstreams
|
2024-10-08 11:31:26 +02:00
|
|
|
ansible.builtin.template:
|
2024-09-19 23:10:00 +02:00
|
|
|
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
|
2024-10-08 11:31:26 +02:00
|
|
|
ansible.builtin.systemd:
|
2024-09-19 23:10:00 +02:00
|
|
|
name: nginx
|
|
|
|
daemon_reload: true
|
|
|
|
enabled: true
|
|
|
|
become: true
|