# vim: set filetype=yaml.ansible : --- - name: Set default broot values ansible.builtin.set_fact: broot: install_methods: - system - source version: 1.55.0 build_deps: Debian: - build-essential - libxcb1-dev - libxcb-render0-dev - libxcb-shape0-dev - libxcb-xfixes0-dev RedHat: - libxcb-devel Alpine: - libxcb-dev Darwin: [] - name: Add broot when: - "'broot' not in __configured" block: - name: Set broot install method when: - broot_install_method is undefined ansible.builtin.set_fact: broot_install_method: "{{ install_method if install_method in broot.install_methods else broot.install_methods[0] }}" - name: Configure broot source install when: - broot_install_method == 'source' block: - name: Set cargo build options ansible.builtin.set_fact: broot_cargo_install: name: broot version: "{{ broot.version }}" - name: Append broot to install list ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + broot.build_deps[os_family] }}" pkg_cargo: "{{ pkg_cargo + [broot_cargo_install] }}" - name: Configure broot system install when: - broot_install_method == 'system' block: - name: Append broot to pkg_sys when: - ansible_system == 'Darwin' ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + ['broot'] }}" - name: Set broot_configured ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'broot': broot_install_method } ) }}"