Reload nginx instead of restart

We don't need to restart nginx - we can instead just reload the
service. Additionally, as more services move to use nginx frontend, it
would be bad to restart all NGinx services at the same time.

For now we need to investigate the impact of reloads in UWsgi before
moving over to a "reload" on UWsgi.

Change-Id: I60e370e784a1ff3a0f5bf8551be804bf05d8bb43
This commit is contained in:
Andy McCrae 2017-02-22 15:30:07 -05:00
parent f83296e073
commit 6867e24438
2 changed files with 7 additions and 7 deletions

View File

@ -70,10 +70,10 @@
- "{{ nova_services['nova-compute']['group'] in group_names }}"
- "{{ nova_services['nova-compute']['condition'] | default(true) }}"
- name: Restart Nginx
- name: Reload Nginx
systemd:
name: nginx
state: restarted
state: reloaded
register: nova_nginx_restart
until: nova_nginx_restart | success
retries: 5

View File

@ -19,7 +19,7 @@
groups: nova
append: yes
notify:
- Restart Nginx
- Reload Nginx
tags:
- nova-install
@ -28,7 +28,7 @@
path: /etc/nginx/sites-enabled/default
state: absent
notify:
- Restart Nginx
- Reload Nginx
- name: Configure custom nginx log format
lineinfile:
@ -36,7 +36,7 @@
dest: "/etc/nginx/nginx.conf"
line: "log_format custom '{{ nova_placement_nginx_access_log_format_combined }} {{ nova_placement_nginx_access_log_format_extras }}';"
notify:
- Restart Nginx
- Reload Nginx
# Configure app
- name: Configure virtual hosts
@ -44,7 +44,7 @@
src: nova-placement-nginx.conf.j2
dest: "/etc/nginx/{{ nova_nginx_conf_path }}/nova_placement_api.conf"
notify:
- Restart Nginx
- Reload Nginx
- name: Link to enable virtual hosts
file:
@ -53,4 +53,4 @@
state: link
when: ansible_os_family == "Debian"
notify:
- Restart Nginx
- Reload Nginx