add rust installation
This commit is contained in:
parent
beec041eb7
commit
90179c1037
2 changed files with 26 additions and 1 deletions
|
|
@ -1,7 +1,6 @@
|
|||
# dots
|
||||
|
||||
```shell
|
||||
curl https://sh.rustup.rs -sSf | sh
|
||||
pip install pipx ansible
|
||||
ansible-playbook --ask-become-pass packages.yml
|
||||
dotter
|
||||
|
|
|
|||
26
packages.yml
26
packages.yml
|
|
@ -1,5 +1,7 @@
|
|||
- name: Install packages
|
||||
hosts: localhost
|
||||
gather_facts: true
|
||||
|
||||
|
||||
tasks:
|
||||
- name: Install system packages
|
||||
|
|
@ -11,6 +13,29 @@
|
|||
- python3-pip
|
||||
- fish
|
||||
state: present
|
||||
|
||||
# rust install, shamelessly stolen from https://waylonwalker.com/install-rust/
|
||||
- name: Check if cargo is installed
|
||||
shell: ls ~/.cargo
|
||||
register: cargo_exists
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Download rust installer
|
||||
when: cargo_exists is failed
|
||||
get_url:
|
||||
url: https://sh.rustup.rs
|
||||
dest: /tmp/sh.rustup.rs
|
||||
mode: '0755'
|
||||
force: 'yes'
|
||||
tags:
|
||||
- rust
|
||||
|
||||
- name: Install rust and cargo
|
||||
when: cargo_exists is failed
|
||||
shell: /tmp/sh.rustup.rs -y
|
||||
tags:
|
||||
- rust
|
||||
|
||||
- name: Install cargo packages
|
||||
community.general.cargo:
|
||||
name:
|
||||
|
|
@ -31,3 +56,4 @@
|
|||
- pdm
|
||||
- poetry
|
||||
- halig
|
||||
- pre-commit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue