All checks were successful
Nix Format Check / check-format (pull_request) Successful in 39s
21 lines
539 B
YAML
21 lines
539 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: Install Rust and Cargo
|
|
shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
args:
|
|
creates: ~/.cargo/bin/rustc
|
|
when: rust_check.rc != 0
|
|
|
|
- name: Add Cargo to PATH
|
|
ansible.builtin.lineinfile:
|
|
path: ~/.bashrc
|
|
line: 'source $HOME/.cargo/env'
|
|
create: yes
|
|
when: rust_check.rc != 0
|