adjusting variable names, fixing errors
This commit is contained in:
@@ -6,27 +6,28 @@
|
||||
## Methods: system
|
||||
## Helpers: cargo
|
||||
---
|
||||
- name: Set default cbfmt values
|
||||
- name: Set default cbfmt values # {{{
|
||||
ansible.builtin.set_fact:
|
||||
cbfmt:
|
||||
install_methods:
|
||||
methods:
|
||||
- source
|
||||
pkgname: cbfmt
|
||||
pkg_deps:
|
||||
- cargo
|
||||
# }}}
|
||||
- name: Configure cbfmt install
|
||||
when:
|
||||
- "'cbfmt' not in __configured"
|
||||
block:
|
||||
- name: Set cbfmt install method
|
||||
when:
|
||||
- cbfmt_install_method is undefined
|
||||
- cbfmt_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
cbfmt_install_method: "{{ install_method if install_method in cbfmt.install_methods else cbfmt.install_methods[0] }}"
|
||||
cbfmt_imethod: "{{ imethod if imethod in cbfmt.methods else cbfmt.methods[0] }}"
|
||||
|
||||
- name: Configure cbfmt source install
|
||||
when:
|
||||
- cbfmt_install_method == 'source'
|
||||
- cbfmt_imethod == 'source'
|
||||
block:
|
||||
- name: Configure cbfmt cargo install
|
||||
ansible.builtin.set_fact:
|
||||
@@ -36,6 +37,10 @@
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cargo: "{{ pkg_cargo + [cbfmt_cargo_install] }}"
|
||||
|
||||
- name: Finalise cbfmt cargo install
|
||||
ansible.builtin.set_fact:
|
||||
cbfmt_install: "{{ cbfmt_imethod }}={{ cbfmt_cargo_install }}"
|
||||
|
||||
- name: Finalise cbfmt configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'cbfmt': cbfmt_install_method } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'cbfmt': cbfmt_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user