- name: Install aptitude apt: name: aptitude state: latest update_cache: true become: true - name: Install docker ansible.builtin.import_tasks: docker.yml - name: Install jq and bzip2 apt: pkg: - jq - bzip2 state: latest update_cache: true become: true - name: check if autorestic is installed stat: path: /usr/local/bin/autorestic register: autorestic_status - name: Install autorestic when: not autorestic_status.stat.exists shell: wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash args: executable: /bin/bash become: true - name: check if restic is installed stat: path: /usr/local/bin/restic register: restic_status - name: Install restic when: not restic_status.stat.exists command: autorestic install become: true