diff --git a/roles/rclone/tasks/install/redhat.yml b/roles/rclone/tasks/install/redhat.yml index 96e3c92..b9a2b05 100644 --- a/roles/rclone/tasks/install/redhat.yml +++ b/roles/rclone/tasks/install/redhat.yml @@ -8,9 +8,22 @@ register: rclone_repos ignore_errors: true -- name: Install rclone from upstream package. - ansible.builtin.package: - url: https://downloads.rclone.org/v1.68.2/rclone-v1.68.2-linux-amd64.rpm - state: present - become: true +- name: Revert to installing from upstream package when: rclone_repos is failed + block: + + - name: Downloading rclone rpm package + ansible.builtin.get_url: + url: https://downloads.rclone.org/v1.68.2/rclone-v1.68.2-linux-amd64.rpm + dest: /tmp/rclone.rpm + + - name: Install rclone from upstream package. + ansible.builtin.package: + path: /tmp/rclone.rpm + state: present + become: true + + - name: Cleanup + ansible.builtin.file: + path: /tmp/rclone.rpm + state: absent