adjusting variable names, fixing errors
This commit is contained in:
@@ -6,27 +6,32 @@
|
||||
## Methods: system
|
||||
## Helpers: -
|
||||
---
|
||||
- name: Set default btop options
|
||||
- name: Set default btop options # {{{
|
||||
ansible.builtin.set_fact:
|
||||
btop:
|
||||
install_methods:
|
||||
methods:
|
||||
- system
|
||||
pkgname: btop
|
||||
# }}}
|
||||
- name: Configure btop install
|
||||
when:
|
||||
- "'btop' not in __configured"
|
||||
block:
|
||||
- name: Set btop install method
|
||||
ansible.builtin.set_fact:
|
||||
btop_install_method: "{{ install_method if install_method in btop.install_methods else btop.install_methods[0] }}"
|
||||
btop_imethod: "{{ imethod if imethod in btop.methods else btop.methods[0] }}"
|
||||
|
||||
- name: Configure btop system install
|
||||
when:
|
||||
- btop_install_method == 'system'
|
||||
- btop_imethod == 'system'
|
||||
block:
|
||||
- name: Append btop to pkg_sys
|
||||
ansible.builtin.set_fact:
|
||||
pkg_sys: "{{ pkg_sys + [btop.pkgname] }}"
|
||||
|
||||
- name: Finalise btop system install
|
||||
ansible.builtin.set_fact:
|
||||
btop_install: "{{ btop_imethod }}={{ btop.pkgname }}"
|
||||
- name: Finalise btop configuration
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'btop': btop_install_method } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'btop': btop_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user