From be9d7df6c41a91614e551733db0bf51f6fdbc300 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Sat, 29 Sep 2012 21:09:38 +0200 Subject: [PATCH] Allow multiline strings to work okay in only_if Fixes issue #1137 --- lib/ansible/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/utils.py b/lib/ansible/utils.py index a980e49ef4f..70aa86782d1 100644 --- a/lib/ansible/utils.py +++ b/lib/ansible/utils.py @@ -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?'''