Skip to content

Commit f591c2c

Browse files
author
Derek
committed
feat: add cargo-update for keeping cargo tools current
Installs cargo-update crate which provides `cargo install-update -a` to update all cargo-installed binaries to latest versions.
1 parent f121e1b commit f591c2c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

  • ansible/roles/developer_core/tasks

ansible/roles/developer_core/tasks/rust.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,16 @@
189189
environment: "{{ cargo_env }}"
190190
become: "{{ ansible_facts['distribution'] != 'MacOSX' }}"
191191
become_user: "{{ actual_user if ansible_facts['distribution'] != 'MacOSX' else omit }}"
192+
193+
# ============================================================
194+
# cargo-update: allows manual `cargo install-update -a` to
195+
# update all cargo-installed tools to latest versions
196+
# ============================================================
197+
198+
- name: Install cargo-update (for updating cargo tools)
199+
ansible.builtin.command:
200+
cmd: cargo install cargo-update
201+
creates: "{{ user_home }}/.cargo/bin/cargo-install-update"
202+
environment: "{{ cargo_env }}"
203+
become: "{{ ansible_facts['distribution'] != 'MacOSX' }}"
204+
become_user: "{{ actual_user if ansible_facts['distribution'] != 'MacOSX' else omit }}"

0 commit comments

Comments
 (0)