Unquote lines that were quoted for safety during eval in lineinfile

Fixes #8535
reviewable/pr18780/r1
James Cammarata 10 years ago
parent 31931b5439
commit 6c9371ea90

@ -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()

Loading…
Cancel
Save