2022-08-01 00:42:23 -05:00
|
|
|
---
|
|
|
|
- name: Set FZF install path if not set
|
|
|
|
ansible.builtin.set_fact:
|
2022-08-01 01:48:49 -05:00
|
|
|
fzf_install_path: "{{ xdg_data_home + '/fzf' }}"
|
2022-08-01 02:12:33 -05:00
|
|
|
when: fzf_install_path is not defined
|
|
|
|
|
|
|
|
- name: Check if FZF installed
|
|
|
|
ansible.builtin.stat:
|
|
|
|
path: "{{ fzf_install_path }}"
|
|
|
|
register: fzf_installed
|
2022-08-01 00:42:23 -05:00
|
|
|
|
|
|
|
- name: Get FZF from git
|
2022-08-01 02:12:33 -05:00
|
|
|
when: not fzf_installed.stat.exists
|
2022-08-01 00:42:23 -05:00
|
|
|
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
|
2022-08-01 02:12:33 -05:00
|
|
|
when: not fzf_installed.stat.exists
|
2022-08-01 00:42:23 -05:00
|
|
|
ansible.builtin.command:
|
|
|
|
argv:
|
2022-08-01 01:54:58 -05:00
|
|
|
- "{{ fzf_install_path }}/install"
|
2022-08-01 00:42:23 -05:00
|
|
|
- --key-bindings
|
|
|
|
- --completion
|
|
|
|
- --no-update-rc
|
|
|
|
- --xdg
|
|
|
|
tags:
|
|
|
|
- fzf
|
|
|
|
- prereq
|