This works:

- name: Pausing to wait for application to start (fixed interval)
      pause: seconds=10
      tags:
        - check

    - name: Run curl
      command: curl localhost:8000
      register: run_curl
      tags:
        - check

    - name: Check curl output
      fail: msg='curl output was not as expected'
      # 'Not found' is the expected content

      when: "run_curl.stdout.find('Not Found') == -1"
      tags:
        - check

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a2f52d69-a745-4a1f-a5cc-292d94d5439a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to