Files
dotfiles/config/ansible/tasks/global/rust.yml
Menno van Leeuwen 112d3679da
Some checks failed
Ansible Lint Check / check-ansible (push) Failing after 1m34s
Nix Format Check / check-format (push) Successful in 57s
style: add YAML document start markers to Ansible playbooks and tasks
2025-03-12 14:05:42 +01:00

25 lines
570 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