Skip to content

Instantly share code, notes, and snippets.

@tgerla
Last active August 29, 2015 14:04
Show Gist options
  • Save tgerla/68acffe05396a1f59252 to your computer and use it in GitHub Desktop.
Save tgerla/68acffe05396a1f59252 to your computer and use it in GitHub Desktop.
- command: grep string file
ignore_errors: yes
register: result
# How to set this fact so that it is a boolean variable, not a string?
- set_fact:
got_string: "{{ (result|success)|bool }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment