Hi,
I have a task as follows:
- hosts: nodes
gather_facts: true
tasks: - name: CurlCP Status
shell: “curl -Is -m 1 http://localhost:9113/cp/healthcheck”
register: cp_status
failed_when: “‘200 OK’ not in cp_status.stdout_lines”
It fails even if 200 Ok is in o/p. I want to fail the job only when 200 OK is not in o/p
Pls help here