adjusting variable names, fixing errors
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
- name: Set cheat default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
cheat:
|
||||
install_methods:
|
||||
methods:
|
||||
- source
|
||||
go_pkg: github.com/cheat/cheat/cmd/cheat
|
||||
version: latest
|
||||
@@ -20,13 +20,13 @@
|
||||
block:
|
||||
- name: Set cheat install method
|
||||
when:
|
||||
- cheat_install_method is undefined
|
||||
- cheat_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
cheat_install_method: "{{ install_method if install_method in cheat.install_methods else cheat.install_methods[0] }}"
|
||||
cheat_imethod: "{{ imethod if imethod in cheat.methods else cheat.methods[0] }}"
|
||||
|
||||
- name: Configure cheat source install
|
||||
when:
|
||||
- cheat_install_method == 'source'
|
||||
- cheat_imethod == 'source'
|
||||
block:
|
||||
- name: Configure cheat go install
|
||||
ansible.builtin.set_fact:
|
||||
@@ -38,6 +38,10 @@
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + [cheat_go_install] }}"
|
||||
|
||||
- name: Finalise cheat go install
|
||||
ansible.builtin.set_fact:
|
||||
cheat_install: "{{ cheat_imethod }}={{ cheat_go_install] }}"
|
||||
|
||||
- name: Set cheat_configured
|
||||
ansible.builtin.set_fact:
|
||||
__configured: "{{ __configured | combine( { 'cheat': cheat_install_method } ) }}"
|
||||
__configured: "{{ __configured | combine( { 'cheat': cheat_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user