Delete PHP upstream when nginx_php is empty

Closes #31
pull/35/head
Emilien Mantel 2017-12-07 11:09:44 +01:00
parent 222998839c
commit 0788b6c84f
1 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,12 @@
when: nginx_php | length > 0 when: nginx_php | length > 0
notify: reload nginx 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 - name: TEMPLATE | Deploy other upstreams
template: template:
src: "etc/nginx/conf.d/_upstream.conf.j2" src: "etc/nginx/conf.d/_upstream.conf.j2"