Skip to content

Commit

Permalink
add rust install
Browse files Browse the repository at this point in the history
  • Loading branch information
dombean committed Feb 13, 2025
1 parent 3b95f3f commit bf7c2f6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
- include_tasks: tasks/r.yml
- include_tasks: tasks/desktop.yml
- include_tasks: tasks/dotfiles.yml
- include_tasks: tasks/rust.yml
- include_tasks: tasks/deb_get.yml
29 changes: 29 additions & 0 deletions tasks/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- name: Install Rust and Cargo
shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
args:
creates: "{{ ansible_env.HOME }}/.cargo/bin/cargo"
become: true
environment:
HOME: "{{ ansible_env.HOME }}"

- name: Ensure Cargo binaries are in PATH
lineinfile:
path: /etc/profile.d/rust.sh
line: 'export PATH="$HOME/.cargo/bin:$PATH"'
create: yes
become: true

- name: Source rust environment (for current session)
shell: source ~/.cargo/env
become: true
when: ansible_env.HOME is defined
environment:
HOME: "{{ ansible_env.HOME }}"

- name: Install yazi-fm and yazi-cli
shell: cargo install --locked yazi-fm yazi-cli
become: true
environment:
HOME: "{{ ansible_env.HOME }}"
args:
creates: "{{ ansible_env.HOME }}/.cargo/bin/yazi-fm"

0 comments on commit bf7c2f6

Please sign in to comment.