diff --git a/tests/test.yml b/tests/test.yml index d67bae9..d581314 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -35,11 +35,12 @@ - name: -- Add HTML file -- copy: dest="{{ nginx_root }}/test.local/public/index.html" content="Index HTML test OK\n" - name: -- VERIFY VHOSTS -- - command: "curl -H 'Host: {{ item.name[0] }}' http://127.0.0.1/" + shell: "curl -H 'Host: {{ item.name[0] }}' http://127.0.0.1/" with_items: nginx_vhosts + when: item.delete is undefined or not item.delete changed_when: false - name: -- VERIFY REDIRECT VHOSTS -- - command: "curl -H 'Host: {{ item.redirect_from[0] }}' http://127.0.0.1/" + shell: "curl -H 'Host: {{ item.redirect_from[0] }}' http://127.0.0.1/" with_items: nginx_vhosts - when: item.redirect_from is defined + when: item.redirect_from is defined and (item.delete is undefined or not item.delete) changed_when: false