Install cargo only if pkg_cargo needs it

This commit is contained in:
Matthew Stobbs
2025-05-10 12:55:10 -06:00
parent 7183372163
commit 454f2fab73
20 changed files with 117 additions and 109 deletions

View File

@@ -99,11 +99,26 @@
- name: Install cargo packages
when:
- pkg_cargo|length > 0
loop: "{{ pkg_cargo | unique }}"
loop_control:
loop_var: pkg
ansible.builtin.include_tasks:
file: cargo.yml
block:
- name: Ensure rust and cargo are installed
vars:
pkg: rust
ansible.builtin.include_tasks:
file: addpkg.yml
- name: Ensure cargo path exists
become: "{{ ext_become }}"
ansible.builtin.file:
state: directory
mode: '0755'
path: "{{ path.cargo }}"
- name: Install cargo packages
loop: "{{ pkg_cargo | unique }}"
loop_control:
loop_var: pkg
ansible.builtin.include_tasks:
file: cargo.yml
- name: Install go packages
when: