summaryrefslogtreecommitdiff
path: root/ansible/roles/rust-rustup/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/rust-rustup/tasks/main.yml')
-rw-r--r--ansible/roles/rust-rustup/tasks/main.yml15
1 files changed, 9 insertions, 6 deletions
diff --git a/ansible/roles/rust-rustup/tasks/main.yml b/ansible/roles/rust-rustup/tasks/main.yml
index 2ebd6f6..a24cf37 100644
--- a/ansible/roles/rust-rustup/tasks/main.yml
+++ b/ansible/roles/rust-rustup/tasks/main.yml
@@ -4,20 +4,23 @@
- build-essential
- cmake
- curl
+ - libssl-dev
+ - pkg-config
- name: "install Rust toolchain using rustup"
shell: |
set -eu
if command -v rustup > /dev/null
then
- sudo -u liw rustup update
+ sudo -u {{ rust_rustup_user }} rustup update
else
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh
- sudo -u liw -i sh /tmp/rustup.sh -y
+ sudo -u {{ rust_rustup_user }} -i sh /tmp/rustup.sh -y --no-modify-path
fi
- sudo -u liw -i rustup component add clippy rust-src
+ sudo -u {{ rust_rustup_user }} -i /home/{{ rust_rustup_user }}/.cargo/bin/rustup self update
+ sudo -u {{ rust_rustup_user }} -i /home/{{ rust_rustup_user }}/.cargo/bin/rustup component add clippy \
+ rust-src rust-analyzer
+
- name: "cargo install applications"
when: rustup_cargo_install is defined
- args:
- warn: no
shell: |
- sudo -i -u liw cargo install {{ rustup_cargo_install }}
+ sudo -i -u {{ rust_rustup_user }} sh -c '. $HOME/.cargo/env && cargo install {{ rustup_cargo_install }}'