Compare commits

...

4 commits

Author SHA1 Message Date
Mohammed Naser
8aa92d3a43
Merge a3bedab1ba into d36a289deb 2024-04-05 23:14:44 +01:00
softwarefactory-project-zuul[bot]
d36a289deb
Merge pull request #490 from atom4git/main
Docs/authorized_key: clarify that the path key should probably NOT be set

SUMMARY

Docs: Fixed unclearance in documentation connected wirh relative path
Added additional description in documentation.

ISSUE TYPE


Docs Pull Request

COMPONENT NAME

authorized_key.py
ADDITIONAL INFORMATION

Clarify the documentation unclearance in connected with relative path ~/.ssh/authorized_keys
The purpose of the pull request is to eliminate ambiguities in the documentation.
In our case, when using the ~ sign, we get the user's root directory (although we explicitly specify a different username)
Here is the issue and full picture of problem which we want to fix: LINK

Closese:  #483

Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
Reviewed-by: atom4git
Reviewed-by: Hideki Saito <saito@fgrep.org>
2024-04-02 08:44:34 +00:00
Sergey
60c8d23c7f
Docs/authorized_key: clarify that the path key should probably NOT be set 2024-04-02 17:08:28 +09:00
Mohammed Naser
a3bedab1ba
synchronize: use _find_needle instead 2023-03-21 18:46:25 -04:00
3 changed files with 8 additions and 6 deletions

View 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)."

View file

@ -48,10 +48,7 @@ class ActionModule(ActionBase):
if ':' in path or path.startswith('/'):
return path
if self._task._role is not None:
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)
path = self._find_needle('files', path)
if original_path and original_path[-1] == '/' and path[-1] != '/':
# make sure the dwim'd path ends in a trailing "/"

View file

@ -28,8 +28,10 @@ options:
required: true
path:
description:
- Alternate path to the authorized_keys file.
- When unset, this value defaults to I(~/.ssh/authorized_keys).
- Alternative path to the authorized_keys file.
- 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
manage_dir:
description: