mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 07:35:31 +01:00
Compare commits
2 commits
fe79339c99
...
463f927df1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
463f927df1 | ||
|
|
8aed31f4e3 |
1 changed files with 4 additions and 12 deletions
|
|
@ -28,10 +28,9 @@ options:
|
|||
required: true
|
||||
path:
|
||||
description:
|
||||
- Alternate path to the authorized_keys file.
|
||||
- When unset, this value defaults to I(~user/.ssh/authorized_keys).
|
||||
- To set this value please define "absolute path"
|
||||
or use I(~user/.ssh/authorized_keys)(where user is your target user_name).
|
||||
- Alternative path to the authorized_keys file.
|
||||
- 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:
|
||||
|
|
@ -90,13 +89,6 @@ EXAMPLES = r'''
|
|||
state: present
|
||||
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
|
||||
ansible.posix.authorized_key:
|
||||
user: charlie
|
||||
|
|
@ -213,7 +205,7 @@ validate_certs:
|
|||
# =========
|
||||
# user = username
|
||||
# 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)
|
||||
# state = absent|present (default: present)
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in a new issue