fix(nginx): restart nginx on any changes

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-11-18 15:23:27 +01:00
parent 7bdc99dbe6
commit 1f4c009197
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8

View file

@ -10,6 +10,7 @@
mode: 0644 mode: 0644
owner: root owner: root
group: root group: root
notify: Restart nginx
- name: Install the SSL snippet - name: Install the SSL snippet
ansible.builtin.template: ansible.builtin.template:
@ -18,6 +19,7 @@
mode: 0644 mode: 0644
owner: root owner: root
group: root group: root
notify: Restart nginx
- name: Install the default config - name: Install the default config
ansible.builtin.copy: ansible.builtin.copy:
@ -26,6 +28,7 @@
mode: 0644 mode: 0644
owner: root owner: root
group: root group: root
notify: Restart nginx
- name: Install the HTTP config - name: Install the HTTP config
ansible.builtin.template: ansible.builtin.template:
@ -34,6 +37,7 @@
mode: 0644 mode: 0644
owner: root owner: root
group: root group: root
notify: Restart nginx
- name: Enable $HOME shortcut - name: Enable $HOME shortcut
ansible.builtin.template: ansible.builtin.template:
@ -42,6 +46,7 @@
mode: 0644 mode: 0644
owner: root owner: root
group: root group: root
notify: Restart nginx
- name: Allow httpd in homedirs in SELinux - name: Allow httpd in homedirs in SELinux
ansible.posix.seboolean: ansible.posix.seboolean:
@ -62,6 +67,7 @@
proxy_upstream: "{{ item.upstream }}" proxy_upstream: "{{ item.upstream }}"
proxy_protocol: "{{ item.protocol }}" proxy_protocol: "{{ item.protocol }}"
loop: "{{ nginx_reverse_proxy }}" loop: "{{ nginx_reverse_proxy }}"
notify: Restart nginx
# httpd_can_network_relay was not enough for the ubiquiti reverse proxy # httpd_can_network_relay was not enough for the ubiquiti reverse proxy
- name: Allow reverse proxy in SELinux - name: Allow reverse proxy in SELinux