This commit is contained in:
parent
5c389255f3
commit
2f427676c5
3 changed files with 20 additions and 0 deletions
1
home.yml
1
home.yml
|
@ -3,6 +3,7 @@
|
|||
hosts: localhost
|
||||
roles:
|
||||
- system-packages
|
||||
- dev-toolchain
|
||||
- shell-tweaks
|
||||
- editor-tweaks
|
||||
- tool-config
|
||||
|
|
17
roles/dev-toolchain/tasks/main.yml
Normal file
17
roles/dev-toolchain/tasks/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- name: Check if rustup is installed
|
||||
shell: which rustup
|
||||
register: which_rustup
|
||||
- name: Install rustup
|
||||
shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
when: which_rustup.rc == 1
|
||||
- name: Check if go is installed
|
||||
shell: go version
|
||||
register: check_go_version
|
||||
- name: Install go
|
||||
become: true
|
||||
shell: |
|
||||
curl -o /tmp/go.tar.gz -L https://go.dev/dl/go{{go_version}}.linux-amd64.tar.gz &&
|
||||
rm -rf /usr/local/go &&
|
||||
sudo tar -C /usr/local -xzf /tmp/go.tar.gz
|
||||
when: check_go_version.rc == 1 or check_go_version.stdout.find(go_version) == -1
|
2
roles/dev-toolchain/vars/main.yml
Normal file
2
roles/dev-toolchain/vars/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
go_version: 1.23.1
|
Loading…
Reference in a new issue