mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-11-25 10:23:43 +00:00
Merge pull request #260 from simon04/patch-1
authorized_key: add lookup.url example SUMMARY Add lookup.url example since using split_lines=False is not straight-forward. ISSUE TYPE Docs Pull Request COMPONENT NAME ansible.posix.authorized_key Reviewed-by: Hideki Saito <saito@fgrep.org> Reviewed-by: Simon Legner <Simon.Legner@gmail.com> Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: None <None>
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- authorized_keys - add an example involving ``url`` lookup plugin (https://github.com/ansible-collections/ansible.posix/pull/260).
|
||||||
@@ -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