# vim: set filetype=yaml.ansible : --- - name: Set zsh default facts # {{{ ansible.builtin.set_fact: zsh: methods: - system pkgname: RedHat: zsh Debian: zsh Alpine: zsh Archlinux: zsh # }}} - 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[os_family]] }}" - name: Finalise zsh system install ansible.builtin.set_fact: zsh_install: "{{ zsh_imethod }}={{ zsh.pkgname[os_family] }}" - 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 } ) }}"