adjusting variable names, fixing errors
This commit is contained in:
@@ -6,25 +6,26 @@
|
||||
## Methods: system
|
||||
## Helpers: -
|
||||
---
|
||||
- name: Set default cargo values
|
||||
- name: Set default cargo values # {{{
|
||||
ansible.builtin.set_fact:
|
||||
cargo:
|
||||
install_methods:
|
||||
methods:
|
||||
- system
|
||||
pkgname:
|
||||
RedHat: cargo
|
||||
Debian: cargo
|
||||
Alpine: cargo
|
||||
FreeBSD: cargo
|
||||
# }}}
|
||||
- name: Configure cargo
|
||||
when:
|
||||
- "'cargo' not in __configured"
|
||||
block:
|
||||
- name: Set cargo install method
|
||||
when:
|
||||
- cargo_install_method is undefined
|
||||
- cargo_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
cargo_install_method: "{{ install_method if install_method in cargo.install_methods else cargo.install_methods[0] }}"
|
||||
cargo_imethod: "{{ imethod if imethod in cargo.methods else cargo.methods[0] }}"
|
||||
|
||||
- name: Add dependencies
|
||||
when:
|
||||
@@ -36,12 +37,16 @@
|
||||
|
||||
- name: Append cargo to install list
|
||||
when:
|
||||
- cargo_install_method == "system"
|
||||
- cargo_imethod == "system"
|
||||
block:
|
||||
- name: Queue cargo install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [cargo.pkgname[os_family]] }}"
|
||||
|
||||
- name: Finalise cargo system install
|
||||
ansible.builtin.set_fact:
|
||||
cargo_install: "{{ cargo_imethod }}={{ cargo.pkgname[os_family] }}"
|
||||
|
||||
- name: Finalize cargo configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine ( { 'cargo': cargo_install_method } ) }}"
|
||||
__configured: "{{ __configured | combine ( { 'cargo': cargo_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user