Dot_Files/tasks/install-fzf.yml

40 lines
948 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
- 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: 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