1
0
Fork 0

Notify to reload nginx configuration

This commit is contained in:
Daniele Tricoli 2021-02-09 02:44:28 +01:00
parent 2c18439948
commit 27438ee8db
2 changed files with 4 additions and 2 deletions

View file

@ -43,7 +43,7 @@
path: "{{ item.path }}"
state: absent
with_items: "{{ vhost_to_delete.files }}"
notify: systemctl restart nginx
notify: systemctl reload nginx
- name: add vhost configuration sylink for {{ item.servername }}
file:
@ -51,7 +51,7 @@
dest: "/etc/nginx/sites-enabled/{{ item.servername }}.vhost"
state: link
with_items: "{{ nginx_vhosts }}"
notify: systemctl restart nginx
notify: systemctl reload nginx
- name: add logrotate configuration for {{ item.servername }}
template:

View file

@ -34,6 +34,7 @@
path: /etc/nginx/nginx.conf
regexp: "^(.*)ssl_protocols"
line: "\tssl_protocols TLSv1.2 TLSv1.3;"
notify: systemctl reload nginx
- name: gzip compression
lineinfile:
@ -46,6 +47,7 @@
line: "\tgzip_comp_level 5;"
- regexp: "^(.*)gzip_types"
line: "\tgzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;"
notify: systemctl reload nginx
- import_tasks: create-vhosts.yml