Deploy nginx configuration

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
certbot_on_virtu
Yohann D'ANELLO 2021-01-02 16:49:47 +01:00 committed by ynerant
parent 6c8be2638c
commit 6ee4d8b44d
1 changed files with 16 additions and 0 deletions

View File

@ -44,6 +44,22 @@
notify: Reload nginx
ignore_errors: "{{ ansible_check_mode }}"
- name: Copy service nginx configuration
when: nginx.servers|length > 0
template:
src: "nginx/sites-available/service.j2"
dest: "/etc/nginx/sites-available/service"
notify: Reload nginx
- name: Activate local nginx service site
when: nginx.servers|length > 0
file:
src: "/etc/nginx/sites-available/service"
dest: "/etc/nginx/sites-enabled/service"
state: link
notify: Reload nginx
ignore_errors: "{{ ansible_check_mode }}"
- name: Copy 50x error page
template:
src: www/html/50x.html.j2