Menno van Leeuwen c651722b73
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 40s
refactor: reorganize Ansible tasks for better structure and include common package installations
2025-01-22 15:11:58 +01:00

23 lines
540 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:
creates: ~/.cargo/bin/rustc
when: rust_check.rc != 0