--- - name: Create borg user ansible.builtin.user: name: borg comment: Borgbackup user create_home: true home: '{{ borg_server_user_home }}' generate_ssh_key: true become: true delegate_to: '{{ borg_server_host }}' - name: Make sure authorized keys exists ansible.builtin.file: path: '{{ borg_server_user_home }}/.ssh/authorized_keys' state: touch owner: borg group: borg mode: '644' access_time: preserve modification_time: preserve become: true delegate_to: '{{ borg_server_host }}'