Compare commits

..

2 commits

Author SHA1 Message Date
atom4git
463f927df1
Merge 8aed31f4e3 into 542643e786 2023-09-05 21:33:45 +00:00
Sergey
8aed31f4e3 Docs/authorized_key: clarify that the path key should probably NOT be set 2023-09-05 17:32:41 -04:00

View file

@ -28,10 +28,9 @@ 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(~user/.ssh/authorized_keys). - Most of the time, it's not necessary to set this key.
- To set this value please define "absolute path" - Use the path to your target authorized_keys if you need to explicitly point on it.
or use I(~user/.ssh/authorized_keys)(where user is your target user_name).
type: path type: path
manage_dir: manage_dir:
description: description:
@ -90,13 +89,6 @@ EXAMPLES = r'''
state: present state: present
key: "{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" key: "{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
- name: Set authorized key taken from file predefined target path
ansible.posix.authorized_key:
user: charlie
state: present
key: "{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
path: ~charlie/.ssh/authorized_keys
- name: Set authorized keys taken from url - name: Set authorized keys taken from url
ansible.posix.authorized_key: ansible.posix.authorized_key:
user: charlie user: charlie
@ -213,7 +205,7 @@ validate_certs:
# ========= # =========
# user = username # user = username
# key = line to add to authorized_keys for user # key = line to add to authorized_keys for user
# path = path to the user's authorized_keys file (default: ~user/.ssh/authorized_keys) # path = path to the user's authorized_keys file (default: ~/.ssh/authorized_keys)
# manage_dir = whether to create, and control ownership of the directory (default: true) # manage_dir = whether to create, and control ownership of the directory (default: true)
# state = absent|present (default: present) # state = absent|present (default: present)
# #