Skip to content

Commit

Permalink
Ensure wget is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
x86-39 committed Aug 2, 2023
1 parent f155d74 commit 390afd9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Role Variables

Variable | Default | Description
--- | --- | ---
`rust_use_rustup` | `true` | Whether to use rustup to install Rust
`rust_use_rustup` | `true` | Whether to use rustup to install Rust\
`rust_rustup_ensure_wget` | `true` | Whether to try to install wget if it is not installed. Requires a become password.
`rust_rustup_toolchains` | `["stable"]` | List of rustup toolchains to install
`rust_rustup_default_toolchain` | `{{ rust_rustup_toolchains[0] }}` | The default rustup toolchain
`rust_rustup_update` | `false` | Whether to update toolchains after installation
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
rust_use_rustup: true
rust_rustup_ensure_wget: true
rust_rustup_toolchains:
- "stable"
rust_rustup_default_toolchain: "{{ rust_rustup_toolchains[0] }}"
Expand Down
7 changes: 7 additions & 0 deletions tasks/setup/default.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
---
- name: Ensure wget is installed
become: true
ansible.builtin.package:
name: wget
state: present
when: rust_rustup_ensure_wget

- name: Download rustup
ansible.builtin.get_url:
url: https://sh.rustup.rs
Expand Down

0 comments on commit 390afd9

Please sign in to comment.