43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Add nerdfonts
|
|
when:
|
|
- "'nerdfonts' not in __configured"
|
|
block:
|
|
- name: Load nerdfonts list
|
|
ansible.builtin.include_vars:
|
|
file: nerdfonts.yml
|
|
name: __nerdfonts
|
|
|
|
- name: Create nerdfonts directories
|
|
become: "{{ install_become }}"
|
|
become_user: "{{ install_become_user }}"
|
|
ansible.builtin.file:
|
|
state: directory
|
|
mode: '0755'
|
|
path: "{{ install_prefix }}/{{ nerdfonts_install_path }}"
|
|
owner: "{{ install_prefix_owner }}"
|
|
group: "{{ install_prefix_group }}"
|
|
|
|
- name: Configure nerdfonts archive install
|
|
when:
|
|
- nerdfonts_install_list|length > 0
|
|
- ansible_facts["system"] != 'Darwin'
|
|
loop: "{{ nerdfonts_install_list }}"
|
|
loop_control:
|
|
loop_var: nf
|
|
ansible.builtin.include_tasks: helpers/nerdfont_config.yml
|
|
|
|
- name: Append nerdfonts to pkg_cask
|
|
when:
|
|
- ansible_facts["system"] == 'Darwin'
|
|
loop: "{{ nerdfonts_install_list }}"
|
|
loop_control:
|
|
loop_var: nf
|
|
ansible.builtin.set_fact:
|
|
pkg_cask: "{{ pkg_cask + [__nerdfonts[nf].brew] }}"
|
|
|
|
- name: Set nerdfonts_configured
|
|
ansible.builtin.set_fact:
|
|
__configured: "{{ __configured | combine( { 'nerdfonts': true } ) }}"
|