- font names now match website - archive key only exists if the archive name is different then the font name
30 lines
988 B
YAML
30 lines
988 B
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Linux installation
|
|
when: ansible_system == 'Linux'
|
|
block:
|
|
- name: Create nerdfonts directories
|
|
become: "{{ ext_become }}"
|
|
loop: "{{ nerdfonts.fonts }}"
|
|
loop_control:
|
|
loop_var: font
|
|
register: nerdfont_result
|
|
ansible.builtin.file:
|
|
path: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Download and extract nerdfonts
|
|
when:
|
|
- nerdfont_result is changed or
|
|
nerdfonts.force_install
|
|
become: "{{ ext_become }}"
|
|
loop: "{{ nerdfonts.fonts }}"
|
|
loop_control:
|
|
loop_var: font
|
|
ansible.builtin.unarchive:
|
|
creates: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}/README.md"
|
|
src: "{{ nerdfonts.base_url }}/{{ pkgconfig.nerdfonts.fonts[font].archive | default(font) }}.tar.xz"
|
|
dest: "{{ path.prefix }}/{{ nerdfonts.path }}/{{ font }}"
|
|
remote_src: true
|