updated tasks so they are only run once

This commit is contained in:
Matthew Stobbs
2025-03-03 12:04:09 -07:00
parent a2718521a5
commit 2ce49c9b85
117 changed files with 2129 additions and 991 deletions

View File

@@ -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