updated tasks so they are only run once
This commit is contained in:
@@ -1,16 +1,28 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Append to srcpkgs
|
||||
- name: Add nerdfonts
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_archive: "{{ pkg_archive + ['nerdfonts'] }}"
|
||||
- nerdfonts_configured is undefined
|
||||
block:
|
||||
- name: Load nerdfonts config
|
||||
ansible.builtin.include_tasks:
|
||||
file: config/nerdfonts.yml
|
||||
|
||||
- name: Append to caskpkgs
|
||||
when:
|
||||
- ansible_system == 'Darwin'
|
||||
loop: "{{ nerdfonts.fonts }}"
|
||||
loop_control:
|
||||
loop_var: font
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cask: "{{ pkg_cask + [pkgconfig.nerdfonts.fonts[font].brew] }}"
|
||||
- name: Append to srcpkgs
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
ansible.builtin.set_fact:
|
||||
pkg_archive: "{{ pkg_archive + ['nerdfonts'] }}"
|
||||
|
||||
- name: Append to caskpkgs
|
||||
when:
|
||||
- ansible_system == 'Darwin'
|
||||
loop: "{{ nerdfonts.fonts }}"
|
||||
loop_control:
|
||||
loop_var: font
|
||||
ansible.builtin.set_fact:
|
||||
pkg_cask: "{{ pkg_cask + [pkgconfig.nerdfonts.fonts[font].brew] }}"
|
||||
|
||||
- name: Set nerdfonts_configured
|
||||
ansible.builtin.set_fact:
|
||||
nerdfonts_configured: true
|
||||
|
||||
Reference in New Issue
Block a user