Maintenance Vhost #35

Merged
muppeth merged 2 commits from maintenance-vhost into master 2023-01-12 21:56:13 +01:00
2 changed files with 10 additions and 1 deletions

View file

@ -44,3 +44,12 @@
notify:
- reload nginx
when: nginx_default_vhost is not none
- name: "[NGINX] - Create maintenance vhosts"
template:
src: etc/nginx/sites-available/maintenance.j2
dest: "{{ nginx_etc_dir }}/sites-available/maintenance-{{ item.name }}"
with_items: "{{ nginx_vhosts }}"
notify:
- reload nginx
when: (item.state is defined) and (item.state != 'delete') and (item.maintenance is defined) and (item.maintenance == 'true')

View file

@ -1,6 +1,6 @@
{% extends "core.j2" %}
{%location root %}
{% block root %}
root {{ nginx_maintenance_page_root }};
index index.html;
{% endblock %}