--- - name: "SSH | Generate an OpenSSH keypair" community.crypto.openssh_keypair: path: "{{ borg_ssh_key_file_path }}" type: "{{ borg_ssh_key_type }}" - name: "SSH | Ensure configuration file is present" ansible.builtin.file: path: "{{ ssh_config_path }}" state: touch mode: "644" - name: "SSH | Insert borgbase configuration" ansible.builtin.blockinfile: path: "{{ ssh_config_path }}" marker: "### {mark} ANSIBLE MANAGED BLOCK" block: | Host *.repo.borgbase.com IdentityFile {{ borg_ssh_key_file_path }}