Dot_Files/tasks/install-fzf.yml

34 lines
793 B
YAML
Raw Normal View History

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
2022-08-01 00:42:23 -05:00
- name: Get FZF from git
ansible.builtin.git:
repo: https://github.com/junegunn/fzf.git
dest: "{{ fzf_install_path }}"
version: "{{ fzf_git_version | default('0.37.0') }}"
2022-08-01 00:42:23 -05:00
depth: 1
tags:
- fzf
- prereq
- name: Check if FZF shell files have been generated
ansible.builtin.stat:
path: "{{ xdg_config_home }}/fzf"
register: fzf_shell_exists
- name: Install FZF
when: not fzf_shell_exists.stat.exists
ansible.builtin.command:
argv:
- "{{ fzf_install_path }}/install"
- --key-bindings
- --completion
- --no-update-rc
- --xdg
tags:
- fzf
- prereq