mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 07:05:27 +01:00
authorized_key: Allow local path to a key
SUMMARY
Add option to specify an absolute path to file with SSH key(s) for authorized_key
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
authorized_key
ADDITIONAL INFORMATION
Before this change you would need to get key using ansible.builtin.slurp or something like ansible.builtin.command: cat <file> with register
I tried to keep it as simple as possible
# Now this is possible
- name: Set authorized keys taken from path
ansible.posix.authorized_key:
user: charlie
state: present
key: /home/charlie/.ssh/id_rsa.pub
Reviewed-by: Hideki Saito <saito@fgrep.org>
Reviewed-by: alexander
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| acl.py | ||
| at.py | ||
| authorized_key.py | ||
| firewalld.py | ||
| firewalld_info.py | ||
| mount.py | ||
| patch.py | ||
| rhel_facts.py | ||
| rhel_rpm_ostree.py | ||
| rpm_ostree_upgrade.py | ||
| seboolean.py | ||
| selinux.py | ||
| synchronize.py | ||
| sysctl.py | ||