소스 검색

updating vhost conditional expressions to check count of list members

Asa Gage 9 년 전
부모
커밋
73d7140752
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      tasks/vhosts.yml

+ 2 - 2
tasks/vhosts.yml

@@ -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