Skip to content

Commit

Permalink
Merge pull request #34 from asagage/fix-vhost-check
Browse files Browse the repository at this point in the history
updating vhost conditional expressions to check count of list members
  • Loading branch information
geerlingguy committed Dec 10, 2015
2 parents e9aa607 + 73d7140 commit 1f99c72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/vhosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1f99c72

Please sign in to comment.