mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-03-10 03:25:22 +01:00
Compare commits
8 commits
cb6b5f91ef
...
9242b756cd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9242b756cd | ||
|
|
d36a289deb | ||
|
|
60c8d23c7f | ||
|
|
34b467719e | ||
|
|
a488709313 | ||
|
|
c9747fd243 | ||
|
|
3d7334dcfc | ||
|
|
42c4c192d4 |
4 changed files with 12 additions and 4 deletions
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- sysctl - fix sysctl to work properly on symlinks (https://github.com/ansible-collections/ansible.posix/issues/111).
|
||||||
3
changelogs/fragments/490_doc_authorized_key_path.yml
Normal file
3
changelogs/fragments/490_doc_authorized_key_path.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- "Bugfix in the documentation regarding the path option for authorised_key(https://github.com/ansible-collections/ansible.posix/issues/483)."
|
||||||
|
|
@ -28,8 +28,10 @@ options:
|
||||||
required: true
|
required: true
|
||||||
path:
|
path:
|
||||||
description:
|
description:
|
||||||
- Alternate path to the authorized_keys file.
|
- Alternative path to the authorized_keys file.
|
||||||
- When unset, this value defaults to I(~/.ssh/authorized_keys).
|
- The default value is the C(.ssh/authorized_keys) of the home of the user specified in the O(user) parameter.
|
||||||
|
- Most of the time, it's not necessary to set this key.
|
||||||
|
- Use the path to your target authorized_keys if you need to explicitly point on it.
|
||||||
type: path
|
type: path
|
||||||
manage_dir:
|
manage_dir:
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
|
|
||||||
|
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue