summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-01-16 13:30:49 +0100
committerAhmed Abdelhalim <[email protected]>2026-01-16 13:30:49 +0100
commit0f49924acbb4799d4f9d3963b623612c1c64f75b (patch)
tree10d4a3cf8d976f8fc39c33ee4d781091c3d7d7b4
parentaeb613133472da374bf292a66296f16e23d8fc6f (diff)
Fix when rust up fails due to network issues
This ensures that the rustup default is set correctly regardless
-rw-r--r--roles/rust/tasks/main.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/roles/rust/tasks/main.yml b/roles/rust/tasks/main.yml
index 08874613..20ec930c 100644
--- a/roles/rust/tasks/main.yml
+++ b/roles/rust/tasks/main.yml
@@ -18,6 +18,11 @@
creates: "{{ ansible_env.HOME }}/.cargo/bin/cargo"
when: not rust_cargo_binary.stat.exists
+- name: "Ensure default toolchain is set"
+ ansible.builtin.command:
+ cmd: "{{ ansible_env.HOME }}/.cargo/bin/rustup default {{ rust_toolchain }}"
+ changed_when: false
+
- name: "Remove cargo default shell profile modification"
ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.bashrc"