updating vhost conditional expressions to check count of list members

This commit is contained in:
Asa Gage 2015-12-10 09:00:39 -05:00
parent e9aa607bb6
commit 73d7140752

View File

@ -11,12 +11,12 @@
src: vhosts.j2
dest: "{{ nginx_vhost_path }}/vhosts.conf"
mode: 0644
when: nginx_vhosts
when: nginx_vhosts|length > 0
notify: restart nginx
- name: Remove managed vhost config file (if no vhosts are configured).
file:
path: "{{ nginx_vhost_path }}/vhosts.conf"
state: absent
when: not nginx_vhosts
when: nginx_vhosts|length == 0
notify: restart nginx