mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-03-10 03:25:22 +01:00
Compare commits
4 commits
289fb80752
...
8aa92d3a43
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8aa92d3a43 | ||
|
|
d36a289deb | ||
|
|
60c8d23c7f | ||
|
|
a3bedab1ba |
3 changed files with 8 additions and 6 deletions
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)."
|
||||||
|
|
@ -48,10 +48,7 @@ class ActionModule(ActionBase):
|
||||||
if ':' in path or path.startswith('/'):
|
if ':' in path or path.startswith('/'):
|
||||||
return path
|
return path
|
||||||
|
|
||||||
if self._task._role is not None:
|
path = self._find_needle('files', path)
|
||||||
path = self._loader.path_dwim_relative(self._task._role._role_path, 'files', path)
|
|
||||||
else:
|
|
||||||
path = self._loader.path_dwim_relative(self._loader.get_basedir(), 'files', path)
|
|
||||||
|
|
||||||
if original_path and original_path[-1] == '/' and path[-1] != '/':
|
if original_path and original_path[-1] == '/' and path[-1] != '/':
|
||||||
# make sure the dwim'd path ends in a trailing "/"
|
# make sure the dwim'd path ends in a trailing "/"
|
||||||
|
|
|
||||||
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue