34 lines
742 B
YAML
34 lines
742 B
YAML
|
---
|
||
|
- name: Check if FZF installed
|
||
|
ansible.builtin.command: command -v fzf
|
||
|
changed_when: false
|
||
|
register: fzf_installed
|
||
|
|
||
|
- name: Set FZF install path if not set
|
||
|
ansible.builtin.set_fact:
|
||
|
fzf_install_path: "{{ XDG_DATA_HOME + '/fzf' }}"
|
||
|
|
||
|
- name: Get FZF from git
|
||
|
when: fzf_installed.rc != 0
|
||
|
ansible.builtin.git:
|
||
|
repo: https://github.com/junegunn/fzf.git
|
||
|
dest: "{{ fzf_install_path }}"
|
||
|
version: "{{ fzf_git_version | default('0.31.0') }}"
|
||
|
depth: 1
|
||
|
tags:
|
||
|
- fzf
|
||
|
- prereq
|
||
|
|
||
|
- name: Install FZF
|
||
|
when: fzf_installed.rc != 0
|
||
|
ansible.builtin.command:
|
||
|
cmd: "{{ fzf_install_path }}"
|
||
|
argv:
|
||
|
- --key-bindings
|
||
|
- --completion
|
||
|
- --no-update-rc
|
||
|
- --xdg
|
||
|
tags:
|
||
|
- fzf
|
||
|
- prereq
|