# vim: set filetype=yaml.ansible : # ## Package: starship ## Description: fancy and useful shell prompt ## Version: latest ## Methods: source ## Helpers: cargo --- - name: Set starship default config ansible.builtin.set_fact: starship: methods: - source - name: Configure starship when: - "'starship' not in __configured" block: - name: Set starship install method when: - starship_imethod is undefined ansible.builtin.set_fact: starship_imethod: "{{ imethod if imethod in starship.methods else starship.methods[0] }}" - name: Configure starship source install when: - starship_imethod == "source" block: - name: Set cargo build options ansible.builtin.set_fact: starship_cargo_install: name: starship locked: true version: "{{ starship_version | default(omit) }}" - name: Append starship to pkg_cargo ansible.builtin.set_fact: pkg_cargo: "{{ pkg_cargo + [{'name': 'starship', 'locked': true}] }}" - name: Finalize starship configuration ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'starship': starship_imethod } ) }}"