--- - name: "Storagebox | Read key from file" ansible.builtin.command: cmd: "cat {{ borg_ssh_key_file_path }}.pub" register: ssh_key - name: "Storagebox | Copy key to Hetzner" ansible.builtin.command: cmd: "echo {{ ssh_key.stdout_lines }} | ssh {{ hetzner_storagebox.user }}@{{ hetzner_storagebox.server }} -p {{ hetzner_storagebox.port }} install-ssh-key" delegate_to: localhost - name: "Storagebox | Create backup directories" ansible.builtin.command: cmd: "ssh {{ hetzner_storagebox.user }}@{{ hetzner_storagebox.server}} -p {{ hetzner_storagebox.port }} mkdir -p {{ borg_repo_path }}" delegate_to: "{{ hetzner_storagebox_host }}"