Squash merge move_to_single_file_pkgs into main
This commit is contained in:
@@ -1,13 +1,47 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: cheet
|
||||
## Description: create and view interactive cheat sheets
|
||||
## Version: latest
|
||||
## Methods: source
|
||||
## Helpers: go_install
|
||||
---
|
||||
- name: Add cheat
|
||||
- name: Set cheat default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
cheat:
|
||||
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_imethod is undefined
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + ['github.com/cheat/cheat/cmd/cheat@latest'] }}"
|
||||
cheat_imethod: "{{ imethod if imethod in cheat.methods else cheat.methods[0] }}"
|
||||
|
||||
- name: Configure cheat source install
|
||||
when:
|
||||
- cheat_imethod == '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: Finalise cheat go install
|
||||
ansible.builtin.set_fact:
|
||||
cheat_install: "{{ cheat_imethod }}={{ cheat_go_install }}"
|
||||
|
||||
- name: Set cheat_configured
|
||||
ansible.builtin.set_fact:
|
||||
cheat_configured: true
|
||||
__configured: "{{ __configured | combine( { 'cheat': cheat_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user