--- - name: configure ssh block: - name: .ssh dir ansible.builtin.file: path: /root/.ssh mode: 0700 state: directory - name: .ssh/confi ansible.builtin.copy: dest: /root/.ssh/config content: | Host * Port 2222 - name: get borg binary get_url: dest: /usr/bin/borg owner: root mode: "0755" url: https://github.com/borgbackup/borg/releases/download/{{ borg_release }}/borg-linuxnew64 - name: ensure /root/bin exists ansible.builtin.file: path: "{{ borg_script_dir }}" state: directory - name: get borgbackup script ansible.builtin.get_url: url: "{{ item.url }}" mode: "{{ item.mode }}" dest: "{{ borg_script_dir }}" loop: - { url: "https://git.hadoly.fr/CS_CT/borg/raw/tag/1.0/borg.sh", mode: "0700" } - name: get borgbackup config vars: borg_dirs_serialized: "{{ borg_dirs | join( ' ' ) }}" ansible.builtin.template: src: borg.conf.jj dest: "{{ borg_script_dir }}/borg.conf" mode: 0600