- name: ensure fonts directory file: path: "/home/{{ user }}/.local/share/fonts" state: directory - name: Hack exists shell: "ls /home/{{ user }}/.local/share/fonts/Hack*Nerd*Font*Complete*" register: hack_exists ignore_errors: yes - name: Download Hack when: hack_exists is failed ansible.builtin.unarchive: src: https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Hack.zip dest: "/home/{{ user }}/.local/share/fonts" remote_src: yes