Delete PHP upstream when nginx_php is empty

Closes #31
This commit is contained in:
Emilien Mantel
2017-12-07 11:09:44 +01:00
parent 222998839c
commit 0788b6c84f

View File

@@ -7,6 +7,12 @@
when: nginx_php | length > 0
notify: reload nginx
- name: FILE | Delete PHP upstream
file:
path: "{{ nginx_etc_dir }}/conf.d/php.conf"
state: absent
when: nginx_php | length == 0
- name: TEMPLATE | Deploy other upstreams
template:
src: "etc/nginx/conf.d/_upstream.conf.j2"