If you want to use meta it's simple but will not mark the play as failed, as 
far as I know there's no explicit way to do that with meta:

- name: abort if string was found
  meta: end_play
  when: command is failed


It might be better to try the fail module since it will return the failed state 
you want:

- name: fail if string was found
  fail:
    msg: string was found!
  when: command is failed

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f6d0e499-6c24-4199-8bdb-458e83838a94%40googlegroups.com.

Reply via email to