1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Allow multiline strings to work okay in only_if

Fixes issue #1137
This commit is contained in:
Daniel Hokka Zakrisson 2012-09-29 21:09:38 +02:00
parent 9377c3f525
commit be9d7df6c4

View file

@ -141,7 +141,7 @@ def check_conditional(conditional):
return not var.startswith("$")
def is_unset(var):
return var.startswith("$")
return eval(conditional)
return eval(conditional.replace("\n", "\\n"))
def is_executable(path):
'''is the given path executable?'''