finished list, now to test them all
This commit is contained in:
@@ -1,13 +1,49 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
#
|
||||
## Package: lazygit
|
||||
## Description: great looking and functional tui git manager
|
||||
## Version: latest
|
||||
## Methods: source
|
||||
## Helpers: go_install
|
||||
---
|
||||
- name: Add lazygit
|
||||
- name: Set lazygit default facts # {{{
|
||||
ansible.builtin.set_fact:
|
||||
lazygit:
|
||||
url: github.com/jesseduffield/lazygit
|
||||
version: "{{ lazygit_version | default('latest') }}"
|
||||
pkg_deps:
|
||||
- go
|
||||
# }}}
|
||||
- name: Configure lazygit
|
||||
when:
|
||||
- lazygit_configured is undefined
|
||||
- "'lazygit' not in __configured"
|
||||
block:
|
||||
- name: Append lazygit to pkg_go
|
||||
- name: Set lazygit install method
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + ['github.com/jesseduffield/lazygit@latest'] }}"
|
||||
lazygit_imethod: "{{ imethod if imethod in lazygit.methods else lazygit.methods[0] }}"
|
||||
|
||||
- name: Set lazygit_configured
|
||||
- name: Configure lazygit source install
|
||||
when:
|
||||
- lazygit_imethod == 'source'
|
||||
block:
|
||||
- name: Set lazygit go install
|
||||
ansible.builtin.set_fact:
|
||||
lazygit_go_install:
|
||||
lazygit_go_pkg:
|
||||
url: "{{ lazygit.url }}@{{ lazygit.version }}"
|
||||
bin: "{{ path_bin }}/lazygit"
|
||||
|
||||
- name: Queue lazygit go install
|
||||
ansible.builtin.set_fact:
|
||||
pkg_go: "{{ pkg_go + [lazygit_go_pkg] }}"
|
||||
lazygit_install: "{{ lazygit_imethod }}={{ lazygit_go_install }}"
|
||||
|
||||
- name: Append pkg_deps to install list
|
||||
loop: "{{ lazygit.pkg_deps }}"
|
||||
loop_control:
|
||||
loop_var: dep
|
||||
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
|
||||
|
||||
- name: Finalise lazygit configuration
|
||||
ansible.builtin.set_fact:
|
||||
lazygit_configured: true
|
||||
__configured: "{{ __configured | combine( { 'lazygit': lazygit_install } ) }}"
|
||||
|
||||
Reference in New Issue
Block a user