Quellcode durchsuchen

Merge pull request #34 from asagage/fix-vhost-check

updating vhost conditional expressions to check count of list members
Jeff Geerling vor 9 Jahren
Ursprung
Commit
1f99c72698
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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