Created
January 2, 2014 11:29
-
-
Save jcassee/8217906 to your computer and use it in GitHub Desktop.
Because the variable `y` is converted to a string, the last debug message is always printed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- debug: var=x | |
- debug: var=y | |
register: z | |
- debug: msg="This task should only be run if x is true" | |
when: y or z|changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
y: "{{ x | default(False) | bool }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment