45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
|
- name: Set nightly as the default toolchain
|
||
|
command: "rustup default nightly-{{ rust_date }}"
|
||
|
args:
|
||
|
creates: "{{ account_homedir.stdout }}/.rustup/toolchains/nightly-{{ rust_date }}-x86_64-unknown-linux-gnu"
|
||
|
|
||
|
- name: Install the musl target
|
||
|
command: rustup target add x86_64-unknown-linux-musl
|
||
|
args:
|
||
|
creates: "{{ account_homedir.stdout }}/.rustup/toolchains/nightly-{{ rust_date }}-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-musl"
|
||
|
|
||
|
# Needed by rust-analyzer (rust-analyzer will attempt to install via rustup on its own, but this will install it manually).
|
||
|
- name: Install the nightly rust-src
|
||
|
command: rustup component add rust-src
|
||
|
args:
|
||
|
creates: "{{ account_homedir.stdout }}/.rustup/toolchains/nightly-{{ rust_date }}-x86_64-unknown-linux-gnu/lib/rustlib/manifest-rust-src"
|
||
|
|
||
|
- name: Install the nightly rust-analyzer
|
||
|
command: rustup component add rust-analyzer
|
||
|
args:
|
||
|
creates: "{{ account_homedir.stdout }}/.rustup/toolchains/nightly-{{ rust_date }}-x86_64-unknown-linux-gnu/bin/rust-analyzer"
|
||
|
|
||
|
- name: Create directories
|
||
|
file:
|
||
|
name: "{{ account_homedir.stdout }}/{{ item }}"
|
||
|
state: directory
|
||
|
mode: 0755
|
||
|
owner: "{{ account_name.stdout }}"
|
||
|
group: "{{ group_name.stdout }}"
|
||
|
loop:
|
||
|
- .cargo
|
||
|
|
||
|
- name: Copy files
|
||
|
no_log: true
|
||
|
copy:
|
||
|
src: "files/{{ item.src }}"
|
||
|
dest: "{{ account_homedir.stdout }}/{{ item.dest }}"
|
||
|
mode: 0600
|
||
|
owner: "{{ account_name.stdout }}"
|
||
|
group: "{{ group_name.stdout }}"
|
||
|
loop:
|
||
|
- src: cargo_credentials.toml
|
||
|
dest: .cargo/credentials
|
||
|
- src: cargo_config.toml
|
||
|
dest: .cargo/config
|