fix bugs add handlers

This commit is contained in:
2024-11-24 19:44:14 +03:00
parent 24fbd9246f
commit 0474fb6047
9 changed files with 121 additions and 9 deletions

View File

@ -2,12 +2,16 @@
zypper:
name: nginx
state: present
notify:
- Restart Nginx
- name: Ensure Nginx is enabled and started
systemd:
name: nginx
enabled: yes
state: started
notify:
- Restart Nginx
- name: Create directory for error pages
file:
@ -16,19 +20,28 @@
owner: nginx
group: nginx
mode: '0755'
notify:
- Restart Nginx
- name: Deploy custom error page
template:
src: site_down.html.j2
dest: /var/www/errors/site_down.html
mode: '0644'
notify:
- Restart Nginx
- name: Deploy Proxy Configuration
template:
src: proxy.conf.j2
dest: /etc/nginx/conf.d/proxy.conf
notify:
- Restart Nginx
- name: Reload Nginx
systemd:
name: nginx
state: reloaded
- name: Deploy Main Nginx Configuration
template:
src: nginx.conf.j2
dest: /etc/nginx/nginx.conf
mode: '0644'
notify:
- Restart Nginx