have a workign copy now

This commit is contained in:
Matthew Stobbs
2026-03-17 16:19:15 -06:00
parent 3c03e5eecf
commit ac0ac25bba
32 changed files with 470 additions and 622 deletions

View File

@@ -6,20 +6,37 @@
## Methods: source
## Helpers: cargo
---
- name: Add choose
- name: Set choose default facts
ansible.builtin.set_fact:
choose:
install_methods:
- source
version: 1.3.7
- name: Configure choose
when:
- "'choose' not in __configured"
block:
- name: Load choose config
ansible.builtin.include_tasks:
file: config/choose.yml
- name: Append choose to pkg_cargo
- name: Set choose install method
when:
- ansible_system == 'Linux'
- choose_install_method is undefined
ansible.builtin.set_fact:
pkg_cargo: "{{ pkg_cargo + [choose] }}"
choose_install_method: "{{ install_method if install_method in choose.install_methods else choose.install_methods[0] }}"
- name: Append choose-rust to pkg_sys
- name: Configure choose source install
when:
- ansible_system == 'Darwin'
- choose_install_method == 'source'
block:
- name: Configure choose cargo install
ansible.builtin.set_fact:
choose_cargo_install:
name: choose
version: "{{ choose.version }}"
- name: Append choose to pkg_cargo
ansible.builtin.set_fact:
pkg_cargo: "{{ pkg_cargo + [choose_cargo_install] }}"
- name: Finalise choose configuration
ansible.builtin.set_fact:
pkg_sys: "{{ pkg_sys + ['choose-rust'] }}"
__configured: "{{ __configured | combine( { 'choose': choose_install_method } ) }}"