50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
#
|
|
## Package: lazygit
|
|
## Description: great looking and functional tui git manager
|
|
## Version: latest
|
|
## Methods: source
|
|
## Helpers: go_install
|
|
---
|
|
- 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' not in __configured"
|
|
block:
|
|
- name: Set lazygit install method
|
|
ansible.builtin.set_fact:
|
|
lazygit_imethod: "{{ imethod if imethod in lazygit.methods else lazygit.methods[0] }}"
|
|
|
|
- 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:
|
|
__configured: "{{ __configured | combine( { 'lazygit': lazygit_install } ) }}"
|