diff --git a/lib/ansible/modules/system/authorized_key.py b/lib/ansible/modules/system/authorized_key.py index df81627326..714c6fb320 100644 --- a/lib/ansible/modules/system/authorized_key.py +++ b/lib/ansible/modules/system/authorized_key.py @@ -139,11 +139,9 @@ EXAMPLES = r''' - name: Set authorized key, removing all the authorized keys already set authorized_key: user: root - key: '{{ item }}' + key: "{{ lookup('file', 'public_keys/doe-jane') }}" state: present exclusive: True - with_file: - - public_keys/doe-jane - name: Set authorized key for user ubuntu copying it from current user authorized_key: