- name: Enable access via build key on all nodes authorized_key: user: "{{ ansible_ssh_user }}" state: present key: "{{ zj_public_key.public_key }}" with_items: - "{{ public_keys }}" loop_control: loop_var: zj_public_key