mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-07-31 11:54:52 +00:00
docs(authorized_key): add lookup.url example
This commit is contained in:
3
changelogs/fragments/255_authorized_key_url.yml
Normal file
3
changelogs/fragments/255_authorized_key_url.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- authorized_keys - add example involving lookup.url
|
||||||
@@ -94,6 +94,12 @@ EXAMPLES = r'''
|
|||||||
state: present
|
state: present
|
||||||
key: https://github.com/charlie.keys
|
key: https://github.com/charlie.keys
|
||||||
|
|
||||||
|
- name: Set authorized keys taken from url using lookup
|
||||||
|
ansible.posix.authorized_key:
|
||||||
|
user: charlie
|
||||||
|
state: present
|
||||||
|
key: "{{ lookup('url', 'https://github.com/charlie.keys', split_lines=False) }}"
|
||||||
|
|
||||||
- name: Set authorized key in alternate location
|
- name: Set authorized key in alternate location
|
||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: charlie
|
user: charlie
|
||||||
|
|||||||
Reference in New Issue
Block a user