- name: check if rustup is installed shell: rustup check register: rustup_exists check_mode: false changed_when: false ignore_errors: true - block: - name: Download rustup installer get_url: url: "{{ rustup_shell_script }}" dest: /tmp/sh.rustup.rs mode: '0755' force: 'yes' - name: install rustup shell: /tmp/sh.rustup.rs -y when: rustup_exists is failed