diff --git a/lib/ansible/utils.py b/lib/ansible/utils.py index 3ebf5b3846..6fefd09164 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 1f5c9b6e74..432f56f62d 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, {})