# vim: set filetype=yaml.ansible : --- - name: Configure yazi installation # {{{ ansible.builtin.set_fact: yazi: methods: - source version: v26.1.22 git: repo: https://github.com/sxyazi/yazi.git pkgname: yazi pkg_depends: - fd - ripgrep - fzf - zoxide build_depends: RedHat: - ImageMagick - ffmpeg-free - file - jq - oniguruma - oniguruma-devel - p7zip-plugins - poppler - wl-clipboard - "@c-development" - "@development-tools" Darwin: - ffmpeg - file - imagemagick - jq - oniguruma - p7zip - poppler # }}} - name: Configure yazi install when: - "'yazi' not in __configured" block: - name: Set yazi install method when: - yazi_imethod is undefined ansible.builtin.set_fact: yazi_imethod: "{{ imethod if imethod in yazi.methods else yazi.methods[0] }}" - name: Configure yazi source install when: - yazi_imethod == 'source' block: - name: Configure yazi cargo build ansible.builtin.set_fact: yazi_src_install: cargo_build_flags: - --release --locked name: "{{ yazi.pkgname }}" repo: "{{ yazi.git.repo }}" source_dir: "{{ path_source }}/{{ yazi.pkgname }}" version: "{{ yazi.version }}" bin_output: "target/release/yazi" bin_name: "yazi" install_prefix: "{{ install_prefix }}" install_files: target/release/ya: bin/ya files_list: - bin/yazi - bin/ya - 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_build + [ yazi_src_install ] }}" yazi_install: "{{ yazi_imethod }}={{ yazi_src_install }}" - name: Finalise yazi configuration when: - __yazi_configured is undefined or not __yazi_configured ansible.builtin.set_fact: __yazi_configured: true