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
    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 

Reply via email to