# vim: set filetype=yaml.ansible : # ## Package: zsh ## Description: an sh compatible shell with a great completion engine ## Version: system ## Methods: system ## Helpers: - --- - name: Set zsh default facts # {{{ ansible.builtin.set_fact: zsh: methods: default: [system] pkgname: default: zsh - name: Finalise zsh default facts ansible.builtin.set_fact: zsh: methods: "{{ zsh.methods[os_family] | default(zsh.methods.default) }}" pkgname: "{{ zsh.pkgname[os_family] | default(zsh.pkgname.default) }}" # }}} - name: Add zsh when: - "'zsh' not in __configured" block: - name: Set zsh install method when: - zsh_imethod is undefined ansible.builtin.set_fact: zsh_imethod: "{{ imethod if imethod in zsh.methods else zsh.methods[0] }}" - name: Append zsh to pkg_sys when: - zsh_imethod == 'system' block: - name: Queue zsh system install ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [zsh.pkgname] }}" - name: Finalise zsh system install ansible.builtin.set_fact: zsh_install: "{{ zsh_imethod }}={{ zsh.pkgname }}" - name: Configure zsh source install when: - zsh_imethod == 'source' block: - name: Set zsh source install facts ansible.builtin.set_fact: zsh_source_install: build_deps: build_flags: source_dir: repo: "{{ zsh_base_url }}" version: "{{ zsh_version }}" files: - name: Set zsh_configured ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'zsh': zsh_install } ) }}"