From 4ded8cb3b348a6f2c944f97fdff065f21e94a4e5 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 18 Sep 2012 21:34:55 -0400 Subject: [PATCH] Change $FILE{} and $PIPE{} to $FILE() and $PIPE() --- lib/ansible/utils.py | 2 +- test/TestUtils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/utils.py b/lib/ansible/utils.py index 3ebf5b38464..6fefd091640 100644 --- a/lib/ansible/utils.py +++ b/lib/ansible/utils.py @@ -220,7 +220,7 @@ def varReplace(raw, vars): return ''.join(done) -_FILEPIPECRE = re.compile(r"\$(?PFILE|PIPE)\{([^\}]+)\}") +_FILEPIPECRE = re.compile(r"\$(?PFILE|PIPE)\(([^\}]+)\)") def varReplaceFilesAndPipes(basedir, raw): done = [] # Completed chunks to return diff --git a/test/TestUtils.py b/test/TestUtils.py index 1f5c9b6e74c..432f56f62d3 100644 --- a/test/TestUtils.py +++ b/test/TestUtils.py @@ -214,14 +214,14 @@ class TestUtils(unittest.TestCase): assert res == u'hello oh great one' def test_varReplace_include(self): - template = 'hello $FILE{world}' + template = 'hello $FILE(world)' res = ansible.utils.template("test", template, {}) assert res == u'hello world\n' def test_varReplace_include_script(self): - template = 'hello $PIPE{echo world}' + template = 'hello $PIPE(echo world)' res = ansible.utils.template("test", template, {})