From a2bb3a09d241d7b997f0400033ba29c2ec7de600 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Tue, 13 Nov 2012 00:08:33 +0100 Subject: [PATCH] Completely ignore stray $ in input Previously, "a $ string $var" would not have gotten replaced at all. --- lib/ansible/utils/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index 0077a838bd..f86d9b09f4 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -133,7 +133,7 @@ def _varFind(text, vars, depth=0): if text[var_end] != '}' or brace_level != 0: return None if var_end == part_start[0]: - return None + return {'replacement': '$', 'start': start, 'end': end} space = _varFindLimitSpace(vars, space, text[part_start[0]:var_end], depth) return {'replacement': space, 'start': start, 'end': end}