Skip to content
Snippets Groups Projects
Verified Commit 319ed050 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

roles/nginx: Add a handler for reloading nginx and change all the roles to use...

roles/nginx: Add a handler for reloading nginx and change all the roles to use it, instead of restarting nginx.
parent 3eaa00af
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@
- name: set up nginx
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/archweb.conf owner=root group=root mode=644
notify:
- restart nginx
- reload nginx
when: archweb_site
- name: make nginx log dir
......
......@@ -26,7 +26,7 @@
- name: set up nginx
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/dbscripts.conf owner=root group=root mode=0644
notify:
- restart nginx
- reload nginx
tags:
- nginx
......
......@@ -3,5 +3,8 @@
- name: restart nginx
service: name=nginx state=restarted
- name: reload nginx
service: name=nginx state=reloaded
- name: daemon reload
command: systemctl daemon-reload
......@@ -52,7 +52,7 @@
- name: install inventory_hostname vhost
template: src=nginx-hostname-vhost.conf.j2 dest=/etc/nginx/nginx.d/nginx-hostname-vhost.conf owner=root group=root mode=0644
notify:
- restart nginx
- reload nginx
- name: activate letsencrypt renewal service
service: name=certbot-renewal.timer enabled=yes state=started
......
......@@ -15,7 +15,7 @@
template: >
src=nginx.conf.j2 dest=/etc/nginx/nginx.d/phpinfo.conf
owner=root group=root mode=0644
notify: restart nginx
notify: reload nginx
- name: configure php-fpm
template: >
......
......@@ -6,7 +6,7 @@
- name: set up nginx
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/planet.conf owner=root group=root mode=0644
notify:
- restart nginx
- reload nginx
- name: make nginx log dir
file: path=/var/log/nginx/{{ planet_domain }} state=directory owner=http group=log mode=0755
......
......@@ -24,4 +24,4 @@
- name: set up nginx
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/public_html.conf owner=root group=root mode=0644
notify:
- restart nginx
- reload nginx
......@@ -40,7 +40,7 @@
- name: set up nginx
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/security-tracker.conf owner=root group=root mode=644
notify:
- restart nginx
- reload nginx
- name: make nginx log dir
file: path=/var/log/nginx/{{ security_tracker_domain }} state=directory owner=http group=log mode=755
......
......@@ -3,7 +3,7 @@
- name: set up nginx
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/sources.conf owner=root group=root mode=0644
notify:
- restart nginx
- reload nginx
- name: make nginx log dir
file: path=/var/log/nginx/{{ sources_domain }} state=directory owner=http group=log mode=0755
......
......@@ -44,5 +44,5 @@
- name: set up nginx
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/syncrepo.conf owner=root group=root mode=0644
notify:
- restart nginx
- reload nginx
when: 'mirror_domain != ""'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment