43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Set zoxide default facts # {{{
|
|
ansible.builtin.set_fact:
|
|
zoxide:
|
|
methods:
|
|
- source
|
|
- system
|
|
cargo:
|
|
name: zoxide
|
|
pkg_deps:
|
|
- cargo
|
|
# }}}
|
|
- name: Configure zoxide
|
|
when:
|
|
- "'zoxide' not in __configured"
|
|
block:
|
|
- name: Set zoxide install method
|
|
when:
|
|
- zoxide_imethod is undefined
|
|
ansible.builtin.set_fact:
|
|
zoxide_imethod: "{{ imethod if imethod in zoxide.methods else zoxide.methods[0] }}"
|
|
|
|
- name: Configure zoxide system install
|
|
when:
|
|
- zoxide_imethod == 'system'
|
|
block:
|
|
- name: Append zoxide to pkg_sys
|
|
ansible.builtin.set_fact:
|
|
pkg_sys: "{{ pkg_sys + ['zoxide'] }}"
|
|
|
|
- name: Configure zoxide cargo install
|
|
when:
|
|
- zoxide_imethod == 'source'
|
|
block:
|
|
- name: Set zoxide cargo facts
|
|
ansible.builtin.set_fact:
|
|
zoxide_cargo_install: "{{ zoxide.cargo }}"
|
|
|
|
- name: Set zoxide_configured
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'zoxide': zoxide_imethod } ) }}"
|