mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
sysctl module: append newline character to lines in the file
This commit is contained in:
parent
6f49642286
commit
c627358c37
1 changed files with 1 additions and 1 deletions
|
@ -246,7 +246,7 @@ class SysctlModule(object):
|
|||
f = open(tmp_path,"w")
|
||||
try:
|
||||
for l in self.fixed_lines:
|
||||
f.write(l)
|
||||
f.write(l.strip() + "\n")
|
||||
except IOError, e:
|
||||
self.module.fail_json(msg="Failed to write to file %s: %s" % (tmp_path, str(e)))
|
||||
f.flush()
|
||||
|
|
Loading…
Reference in a new issue