Compare commits

...

8 commits

Author SHA1 Message Date
Sato Kenta
870bca1e4b
Merge 34b467719e into 719f7dfebf 2023-11-24 23:17:15 +00:00
softwarefactory-project-zuul[bot]
719f7dfebf
Merge pull request #510 from saito-hideki/issue/509
[CI] Replace Fedora 38 with 39 for devel branch container test

SUMMARY
Replace Fedora 38 container test with 39 for devel branch.

Fixed /#509

ISSUE TYPE

CI test Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None
2023-11-23 15:56:55 +00:00
Hideki Saito
5cae7aa946 Replace Fedora 38 with 39 for devel branch container test 2023-11-22 17:09:41 +09:00
satken2
34b467719e sysctl: Fixed sysctl to work on symlinks(#111) 2021-06-12 01:03:28 +09:00
satken2
a488709313 sysctl: Fixed sysctl to work on symlinks(#111) 2021-06-12 00:33:39 +09:00
satken2
c9747fd243 sysctl: Fixed sysctl to work on symlinks(#111) 2021-06-12 00:33:20 +09:00
satken2
3d7334dcfc sysctl: Fixed sysctl to work on symlinks(#111) 2021-06-11 23:57:09 +09:00
satken2
42c4c192d4 sysctl: Fixed sysctl to work on symlinks(#111) 2021-06-10 23:42:18 +09:00
4 changed files with 10 additions and 4 deletions

View file

@ -51,8 +51,8 @@ stages:
parameters: parameters:
testFormat: devel/linux/{0}/1 testFormat: devel/linux/{0}/1
targets: targets:
- name: Fedora 38 - name: Fedora 39
test: fedora38 test: fedora39
- name: Ubuntu 20.04 - name: Ubuntu 20.04
test: ubuntu2004 test: ubuntu2004
- name: Ubuntu 22.04 - name: Ubuntu 22.04

View file

@ -0,0 +1,3 @@
---
bugfixes:
- sysctl - fix sysctl to work properly on symlinks (https://github.com/ansible-collections/ansible.posix/issues/111).

View file

@ -0,0 +1,3 @@
---
trivial:
- "Replace Fedora 38 with 39 for container test(https://github.com/ansible-collections/ansible.posix/issues/509)."

View file

@ -366,7 +366,7 @@ class SysctlModule(object):
# Completely rewrite the sysctl file # Completely rewrite the sysctl file
def write_sysctl(self): def write_sysctl(self):
# open a tmp file # open a tmp file
fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(self.sysctl_file)) fd, tmp_path = tempfile.mkstemp('.conf', '.ansible_m_sysctl_', os.path.dirname(os.path.realpath(self.sysctl_file)))
f = open(tmp_path, "w") f = open(tmp_path, "w")
try: try:
for l in self.fixed_lines: for l in self.fixed_lines:
@ -377,7 +377,7 @@ class SysctlModule(object):
f.close() f.close()
# replace the real one # replace the real one
self.module.atomic_move(tmp_path, self.sysctl_file) self.module.atomic_move(tmp_path, os.path.realpath(self.sysctl_file))
# ============================================================== # ==============================================================