softwarefactory-project-zuul[bot] 0821768bcb Merge pull request #568 from abakanovskii/feature/add_path_option_authorized_key
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
2024-09-30 07:07:25 +00:00
2024-09-05 16:08:40 +09:00
2024-06-07 07:03:56 +02:00
2024-09-11 12:12:05 +09:00
2020-03-09 13:15:28 +00:00
2024-09-12 10:41:07 +09:00
2024-09-25 09:37:42 +09:00

ansible.posix

Build Status Run Status

An Ansible Collection of modules and plugins that target POSIX UNIX/Linux and derivative Operating Systems.

Communication

For more information about communication, see the Ansible communication guide.

Supported Versions of Ansible

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.15.

Included content

Check out Ansible Galaxy or the Ansible documentation for all modules and plugins included in this collection.

Installing this collection

You can install the ansible.posix collection with the Ansible Galaxy CLI:

ansible-galaxy collection install ansible.posix

You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: ansible.posix

Using this collection

See Ansible Using collections for more details.

Contributing to this collection

We welcome community contributions to this collection. See Contributing to Ansible-maintained collections for complete details.

Code of Conduct

This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.

Release notes

See changelog for more details.

External requirements

None

Tested with Ansible

  • ansible-core 2.19 (devel)
  • ansible-core 2.18 (stable) *
  • ansible-core 2.17 (stable)
  • ansible-core 2.16 (stable)
  • ansible-core 2.15 (stable)

Note: For ansible-core 2.18, CI only covers sanity tests and no integration tests will be run until the test environment is released.

Roadmap

More information

Licensing

GNU General Public License v3.0 or later.

See COPYING to see the full text.

Description
Ansible Collection for Posix
Readme 5.5 MiB
Languages
Python 96.2%
Shell 3.8%