updating and removing
This commit is contained in:
@@ -1,13 +1,42 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: cheet
|
||||
## Version: latest
|
||||
## Methods: source
|
||||
## Helpers: go
|
||||
---
|
||||
- name: Add cheat
|
||||
- name: Set cheat default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
cheat:
|
||||
install_methods:
|
||||
- source
|
||||
go_pkg: github.com/cheat/cheat/cmd/cheat
|
||||
version: latest
|
||||
# }}}
|
||||
- name: Configure cheat
|
||||
when:
|
||||
- cheat_configured is undefined
|
||||
- "'cheat' not in __configured"
|
||||
block:
|
||||
- name: Append cheat to pkg_go
|
||||
- name: Set cheat install method
|
||||
when:
|
||||
- cheat_install_method is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + ['github.com/cheat/cheat/cmd/cheat@latest'] }}"
|
||||
cheat_install_method: "{{ install_method if install_method in cheat.install_methods else cheat.install_methods[0] }}"
|
||||
|
||||
- name: Configure cheat source install
|
||||
when:
|
||||
- cheat_install_method == 'source'
|
||||
block:
|
||||
- name: Configure cheat go install
|
||||
ansible.builtin.set_fact:
|
||||
cheat_go_install:
|
||||
url: "{{ cheat.go_pkg }}@{{ cheat.version }}"
|
||||
bin: "{{ path_bin }}/cheat"
|
||||
|
||||
- name: Append cheat to pkg_go
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + [cheat_go_install] }}"
|
||||
|
||||
- name: Set cheat_configured
|
||||
ansible.builtin.set_fact:
|
||||
cheat_configured: true
|
||||
__configured: "{{ __configured | combine( { 'cheat': cheat_install_method } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user