--- - name: Set ssh authorized_keys ansible.posix.authorized_key: key: "{{ ssh_authorized_keys | union(ssh_authorized_keys_extra) | flatten | join('\n') }}" state: present user: "{{ ansible_user }}" exclusive: true