mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Unquote lines that were quoted for safety during eval in lineinfile
Fixes #8535
This commit is contained in:
parent
be0ca219d2
commit
b3371b8de8
1 changed files with 2 additions and 1 deletions
|
@ -370,7 +370,7 @@ def main():
|
||||||
line = re.sub(r'(\\[0-9]{1,3})', r'\\\1', params['line'])
|
line = re.sub(r'(\\[0-9]{1,3})', r'\\\1', params['line'])
|
||||||
else:
|
else:
|
||||||
line = params['line']
|
line = params['line']
|
||||||
line = module.safe_eval(pipes.quote(line))
|
line = unquote(module.safe_eval(pipes.quote(line)))
|
||||||
|
|
||||||
present(module, dest, params['regexp'], line,
|
present(module, dest, params['regexp'], line,
|
||||||
ins_aft, ins_bef, create, backup, backrefs)
|
ins_aft, ins_bef, create, backup, backrefs)
|
||||||
|
@ -382,5 +382,6 @@ def main():
|
||||||
|
|
||||||
# import module snippets
|
# import module snippets
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
|
from ansible.module_utils.splitter import *
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in a new issue