# vim: set filetype=yaml.ansible : --- - name: Configure ansible when: - "'ansible' not in __configured" block: - name: Set ansible install method when: - ansible_install_method is undefined ansible.builtin.set_fact: ansible_install_method: "{% if install_method in ansible_install_methods %}{{ install_method }}{% else %}{{ ansible_install_methods[0] }}{% endif %}" - name: Append ansible to system package manager install list when: - ansible_install_method == 'system' ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [ansible_pkgname[ansible_os_family]] }}" - name: Append ansible to pipx install list when: - ansible_install_method == 'source' ansible.builtin.set_fact: pkg_pipx: "{{ pkg_pipx + [ansible_pip_pkgname] }}" - name: Complete ansible configuration ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'ansible': true } ) }}"