From b3371b8de8da8df093afb0209e918337f4cd1826 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 11 Aug 2014 11:01:23 -0500 Subject: [PATCH] Unquote lines that were quoted for safety during eval in lineinfile Fixes #8535 --- library/files/lineinfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/files/lineinfile b/library/files/lineinfile index ef2714ed71..f40ebb341e 100644 --- a/library/files/lineinfile +++ b/library/files/lineinfile @@ -370,7 +370,7 @@ def main(): line = re.sub(r'(\\[0-9]{1,3})', r'\\\1', params['line']) else: line = params['line'] - line = module.safe_eval(pipes.quote(line)) + line = unquote(module.safe_eval(pipes.quote(line))) present(module, dest, params['regexp'], line, ins_aft, ins_bef, create, backup, backrefs) @@ -382,5 +382,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * +from ansible.module_utils.splitter import * main()