From b42cbb2a972353cf1b58c002756a32ea1866a08b Mon Sep 17 00:00:00 2001 From: Hideki Saito Date: Wed, 27 May 2026 17:01:01 +0900 Subject: [PATCH] authorized_key: Use loop instead of with_file in example (#740) (#749) Fixes: #607 (cherry picked from commit af933670cc827e55a4b04e3d0a98fd01956c5aa2) Signed-off-by: Abhijeet Kasurde Co-authored-by: Abhijeet Kasurde --- plugins/modules/authorized_key.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/modules/authorized_key.py b/plugins/modules/authorized_key.py index 5908610..17a747c 100644 --- a/plugins/modules/authorized_key.py +++ b/plugins/modules/authorized_key.py @@ -121,10 +121,10 @@ EXAMPLES = r''' ansible.posix.authorized_key: user: deploy state: present - key: '{{ item }}' - with_file: - - public_keys/doe-jane - - public_keys/doe-john + key: "{{ lookup('file', item) }}" + loop: + - public_keys/doe-jane + - public_keys/doe-john - name: Set authorized key defining key options ansible.posix.authorized_key: