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

Merge pull request #1148 from dhozac/multiline-only_if

Allow multiline strings to work okay in only_if
This commit is contained in:
Michael DeHaan 2012-09-29 13:25:07 -07:00
commit 8b55217df0

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