mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-03-09 19:15:19 +01:00
Compare commits
5 commits
f57f1a7c93
...
73123bb6b5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73123bb6b5 | ||
|
|
d36a289deb | ||
|
|
60c8d23c7f | ||
|
|
d032d13083 | ||
|
|
12ecc3823b |
3 changed files with 15 additions and 3 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)."
|
||||||
|
|
@ -77,7 +77,14 @@ class ActionModule(ActionBase):
|
||||||
|
|
||||||
if self._host_is_ipv6_address(host):
|
if self._host_is_ipv6_address(host):
|
||||||
return '[%s%s]:%s' % (user_prefix, host, path)
|
return '[%s%s]:%s' % (user_prefix, host, path)
|
||||||
return '%s%s:%s' % (user_prefix, host, path)
|
|
||||||
|
# preserve formatting of remote paths if host or user@host is explicitly defined in the path
|
||||||
|
if ':' not in path:
|
||||||
|
return '%s%s:%s' % (user_prefix, host, path)
|
||||||
|
elif '@' not in path:
|
||||||
|
return '%s%s' % (user_prefix, path)
|
||||||
|
else:
|
||||||
|
return path
|
||||||
|
|
||||||
def _process_origin(self, host, path, user):
|
def _process_origin(self, host, path, user):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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