Compare commits
2 Commits
14270d4217
...
05b7b53677
| Author | SHA1 | Date | |
|---|---|---|---|
| 05b7b53677 | |||
| 9170f6af1d |
31
playbook.yml
31
playbook.yml
@@ -394,6 +394,16 @@
|
|||||||
system: true
|
system: true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: add rustup stable toolchain
|
||||||
|
command: rustup default stable
|
||||||
|
become: true
|
||||||
|
become_user: rust_build
|
||||||
|
|
||||||
|
- name: update rustup stable toolchain
|
||||||
|
command: rustup update stable
|
||||||
|
become: true
|
||||||
|
become_user: rust_build
|
||||||
|
|
||||||
- name: set crate list
|
- name: set crate list
|
||||||
set_fact:
|
set_fact:
|
||||||
cargo_crate_list:
|
cargo_crate_list:
|
||||||
@@ -415,6 +425,7 @@
|
|||||||
- crate: watchexec-cli
|
- crate: watchexec-cli
|
||||||
binary: watchexec
|
binary: watchexec
|
||||||
version: 1.17.1
|
version: 1.17.1
|
||||||
|
|
||||||
- name: build rust crates
|
- name: build rust crates
|
||||||
shell: |
|
shell: |
|
||||||
cargo install --version {{ item.version }} {{ item.crate }}
|
cargo install --version {{ item.version }} {{ item.crate }}
|
||||||
@@ -425,9 +436,27 @@
|
|||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
|
||||||
|
- name: create target directory
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: /usr/local/lib/binaries/
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0775'
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: move binaries
|
||||||
|
shell: |
|
||||||
|
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }} /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
||||||
|
ln -s /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
|
||||||
|
args:
|
||||||
|
creates: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
||||||
|
become: true
|
||||||
|
loop: "{{ cargo_crate_list }}"
|
||||||
|
|
||||||
- name: link binaries
|
- name: link binaries
|
||||||
file:
|
file:
|
||||||
src: /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
|
src: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
||||||
dest: /usr/local/bin/{{ item.binary }}
|
dest: /usr/local/bin/{{ item.binary }}
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|||||||
Reference in New Issue
Block a user