Files
dotfiles/config/ansible/tasks/global/rust.yml
Menno van Leeuwen 62954eb986
Some checks failed
Nix Format Check / check-format (push) Failing after 37s
feat: remove deprecated shell scripts and add Python alternatives for all of them
2025-03-10 15:48:33 +01:00

24 lines
566 B
YAML

- name: Check if Rust is installed
ansible.builtin.shell: source $HOME/.cargo/env && rustc --version
register: rust_check
changed_when: false
failed_when: false
args:
executable: /bin/bash
- name: Download Rust installation script
ansible.builtin.get_url:
url: https://sh.rustup.rs
dest: /tmp/rustup.sh
mode: '0755'
when: rust_check.rc != 0
- name: Install Rust and Cargo
ansible.builtin.shell: |
set -o pipefail
/tmp/rustup.sh -y
args:
executable: /bin/bash
creates: ~/.cargo/bin/rustc
when: rust_check.rc != 0