env/roles/dev-toolchain/tasks/main.yml
Marc Cataford 2f427676c5
Some checks are pending
/ sast (push) Waiting to run
feat: add rustup + go
2024-09-29 13:46:55 -04:00

17 lines
594 B
YAML

---
- 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