fix fd and yazi
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
## force_git: _bool_ optional, default true. Force clone, overwriting existing dir
|
## force_git: _bool_ optional, default true. Force clone, overwriting existing dir
|
||||||
## recursive: _bool_ optional, default true. Do a recursive clone
|
## recursive: _bool_ optional, default true. Do a recursive clone
|
||||||
## version: _string_ optional, default 'latest'. Version to checkout and build
|
## version: _string_ optional, default 'latest'. Version to checkout and build
|
||||||
|
## locked: _bool_ optional, default 'false'
|
||||||
## build_flags: _list[str]_ optional. If set, will append these to the build command
|
## build_flags: _list[str]_ optional. If set, will append these to the build command
|
||||||
---
|
---
|
||||||
- name: Cargo source install helper
|
- name: Cargo source install helper
|
||||||
@@ -24,9 +25,14 @@
|
|||||||
ansible.builtin.include_tasks: helpers/git.yml
|
ansible.builtin.include_tasks: helpers/git.yml
|
||||||
|
|
||||||
- name: Build cargo release
|
- name: Build cargo release
|
||||||
ansible.builtin.command:
|
become: "{{ install_become }}"
|
||||||
chdir: "{{ pkg.source_dir }}"
|
become_user: "{{ install_become_user }}"
|
||||||
argv: "{{ ['cargo', 'build'] + pkg.build_flags }}"
|
community.general.cargo:
|
||||||
|
directory: "{{ pkg.source_dir }}"
|
||||||
|
path: "{{ install_prefix }}"
|
||||||
|
name: "{{ pkg.name }}"
|
||||||
|
version: "{{ pkg.version }}"
|
||||||
|
locked: "{{ pkg.locked }}"
|
||||||
|
|
||||||
- name: Clean existing install
|
- name: Clean existing install
|
||||||
vars:
|
vars:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
block:
|
block:
|
||||||
- name: Queue fd for system install
|
- name: Queue fd for system install
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
pkg_sys: "{{ pkg_sys + fd.pkgname[os_family] }}"
|
pkg_sys: "{{ pkg_sys + [ fd.pkgname[os_family] ] }}"
|
||||||
|
|
||||||
- name: Finalise fd system install
|
- name: Finalise fd system install
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
---
|
---
|
||||||
- name: Configure yazi installation # {{{
|
- name: Configure yazi installation # {{{
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
yazi:
|
||||||
methods:
|
methods:
|
||||||
- source
|
- source
|
||||||
version: v26.1.22
|
version: v26.1.22
|
||||||
@@ -43,14 +44,21 @@
|
|||||||
when:
|
when:
|
||||||
- yazi_imethod is undefined
|
- yazi_imethod is undefined
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
yazi_imethod: "{{ imethod if imethod in yazi.methods else yazi.methods[0] }}"
|
||||||
|
|
||||||
- name: Configure yazi source install
|
- name: Configure yazi source install
|
||||||
|
when:
|
||||||
|
- yazi_imethod == 'source'
|
||||||
|
block:
|
||||||
|
- name: Configure yazi cargo build
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
yazi_src_install:
|
yazi_src_install:
|
||||||
cargo_build_flags:
|
cargo_build_flags:
|
||||||
- --release --locked
|
- --release --locked
|
||||||
name: "{{ yazi_pkgname }}"
|
name: "{{ yazi.pkgname }}"
|
||||||
repo: "{{ yazi_git_repo }}"
|
repo: "{{ yazi.git.repo }}"
|
||||||
version: "{{ yazi_version }}"
|
source_dir: "{{ path_source }}/{{ yazi.pkgname }}"
|
||||||
|
version: "{{ yazi.version }}"
|
||||||
bin_output: "target/release/yazi"
|
bin_output: "target/release/yazi"
|
||||||
bin_name: "yazi"
|
bin_name: "yazi"
|
||||||
install_prefix: "{{ install_prefix }}"
|
install_prefix: "{{ install_prefix }}"
|
||||||
@@ -60,23 +68,21 @@
|
|||||||
- bin/yazi
|
- bin/yazi
|
||||||
- bin/ya
|
- bin/ya
|
||||||
|
|
||||||
- name: Set _yazi_configured
|
- name: Append yazi-fm pkg_deps
|
||||||
|
loop: "{{ yazi.pkg_depends }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: dep
|
||||||
|
ansible.builtin.include_tasks: "pkgs/{{ dep }}.yml"
|
||||||
|
|
||||||
|
- name: Append yazi to pkg_cargo_build
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
pkg_sys: "{{ pkg_sys + yazi.build_depends[ansible_os_family] }}"
|
||||||
|
pkg_cargo_build: "{{ pkg_cargo + [ yazi_src_install ] }}"
|
||||||
|
yazi_install: "{{ yazi_imethod }}={{ yazi_src_install }}"
|
||||||
|
|
||||||
|
- name: Finalise yazi configuration
|
||||||
when:
|
when:
|
||||||
- __yazi_configured is undefined or
|
- __yazi_configured is undefined or
|
||||||
not __yazi_configured
|
not __yazi_configured
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
__yazi_configured: true
|
__yazi_configured: true
|
||||||
|
|
||||||
- name: Append yazi-fm pkg_deps
|
|
||||||
loop: "{{ yazi_pkg_depends }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: yazi_pkg_dep
|
|
||||||
vars:
|
|
||||||
pkg: "{{ yazi_pkg_dep }}"
|
|
||||||
ansible.builtin.include_tasks:
|
|
||||||
file: "helpers/addpkg.yml"
|
|
||||||
|
|
||||||
- name: Append yazi to pkg_cargo_build
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
pkg_sys: "{{ pkg_sys + yazi_build_depends[ansible_os_family] }}"
|
|
||||||
pkg_cargo_build: "{{ pkg_cargo + yazi_src_install }}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user