--- - name: configure ssh block: - name: .ssh dir ansible.builtin.file: path: /root/.ssh mode: 0700 state: directory - name: .ssh/config ansible.builtin.copy: dest: /root/.ssh/config content: | Host * Port 2222 - name: get borg binary ansible.builtin.package: name: borgbackup state: present - 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