# vim: set filetype=yaml.ansible : # ## Package: gping ## Description: TUI ping tools with style ## Version: latest ## Methods: [system, source] ## Helpers: cargo --- - name: Set gping default facts # {{{ ansible.builtin.set_fact: gping: methods: - system - source version: "{{ gping_version | default('latest') }}" pkgname: gping # }}} - name: Configure gping when: - "'gping' not in __configured" block: - name: Set gping install method when: - gping_imethod is undefined ansible.builtin.set_fact: gping_imethod: "{{ imethod if imethod in gping.methods else gping.methods[0] }}" - name: Configure gping system install when: - gping_imethod == 'system' block: - name: Append gping to pkg_sys ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [gping.pkgname] }}" gping_install: "{{ gping_imethod }}={{ gping.pkgname }}" - name: Configure gping source install when: - gping_imethod == 'source' block: - name: Set gping cargo install ansible.builtin.set_fact: gping_cargo_install: name: "{{ gping.pkgname }}" version: "{{ gping.version }}" locked: true - name: Queue gping cargo install ansible.builtin.set_fact: pkg_cargo: "{{ pkg_carg + [gping_cargo_install] }}" gping_install: "{{ gping_imethod }}={{ gping_cargo_install }}" - name: Finalise gping configuration ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'gping': gping_install } ) }}"