mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-30 07:50:43 +00:00
Merge branch 'fix-5679' of https://github.com/jirutka/ansible into jirutka-fix-5679
This commit is contained in:
commit
9c9a940af6
2 changed files with 22 additions and 1 deletions
|
|
@ -348,7 +348,11 @@ def main():
|
|||
if ins_bef is None and ins_aft is None:
|
||||
ins_aft = 'EOF'
|
||||
|
||||
present(module, dest, params['regexp'], params['line'],
|
||||
# Replace the newline character with an actual newline. Don't replace
|
||||
# escaped \\n, hence sub and not str.replace.
|
||||
line = re.sub(r'\n', os.linesep, params['line'])
|
||||
|
||||
present(module, dest, params['regexp'], line,
|
||||
ins_aft, ins_bef, create, backup, backrefs)
|
||||
else:
|
||||
if params['regexp'] is None and params.get('line', None) is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue