homelab/roles/proxy/handlers/main.yml

16 lines
416 B
YAML
Raw Permalink Normal View History

- name: Enable nginx sites configuration
ansible.builtin.file:
src: "/etc/nginx/sites-available/{{ item.item.domain }}.conf"
dest: "/etc/nginx/sites-enabled/{{ item.item.domain }}.conf"
state: link
mode: "400"
loop: "{{ nginx_sites.results }}"
when: item.changed
listen: reload_nginx
2022-05-22 04:19:56 +00:00
- name: Reload nginx
2023-05-04 03:42:55 +00:00
ansible.builtin.service:
2022-05-22 04:19:56 +00:00
name: nginx
state: reloaded
2023-11-06 02:34:19 +00:00
listen: reload_nginx