From fc909b453fc347f91e811295fccf683144731d80 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 18 Nov 2013 17:32:13 -0500 Subject: [PATCH] Make the legacy template detection system not hit a false positive when replacing a \$ with $. --- lib/ansible/utils/template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index af4557c31df..a5965ef555a 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -298,8 +298,9 @@ def legacy_varReplace(basedir, raw, vars, lookup_fatal=True, depth=0, expand_lis result = ''.join(done) - if result != orig: + if (not '\$' in orig) and (result != orig): from ansible import utils + # above check against \$ as templating will remove the backslash utils.deprecated("Legacy variable subsitution, such as using ${foo} or $foo instead of {{ foo }} is currently valid but will be phased out and has been out of favor since version 1.2. This is the last of legacy features on our deprecation list. You may continue to use this if you have specific needs for now","1.6") return result