Skip to content

Commit d44ac44

Browse files
committed
Adapt rust playbook to new way of passing user
1 parent d17162d commit d44ac44

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

infra/ansible/rust.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
- name: Rust Setup
22
hosts: all
3-
become: true
43

54
pre_tasks:
65
- name: update repositories
76
apt: update_cache=yes
87
become: true
9-
changed_when: False
8+
changed_when: false
9+
1010
tasks:
1111
- name: check if cargo is installed
12-
shell: . ~/.profile && cargo -v
12+
become_user: '{{ app_user }}'
13+
shell: /home/{{ app_user }}/.cargo/bin/cargo -v
1314
register: cargo_exists
1415
ignore_errors: true
1516

1617
- name: Download Installer
17-
become_user: "{{ app_user }}"
1818
when: cargo_exists is failed
19+
become_user: '{{ app_user }}'
1920
get_url:
2021
url: https://sh.rustup.rs
2122
dest: /tmp/sh.rustup.rs
@@ -26,7 +27,7 @@
2627

2728
- name: install rust/cargo
2829
when: cargo_exists is failed
29-
shell: /tmp/sh.rustup.rs -y
3030
become_user: "{{ app_user }}"
31+
shell: /tmp/sh.rustup.rs -y && rm /tmp/sh.rustup.rs
3132
tags:
3233
- rust

0 commit comments

Comments
 (0)