fixing and adding packages

This commit is contained in:
Matthew Stobbs
2025-01-18 16:00:26 -07:00
parent 333ee4c3f5
commit 985da518b4
114 changed files with 555 additions and 498 deletions

View File

@@ -1,22 +1,33 @@
# Install nerdfonts for each platform
---
- name: Create nerdfonts directories
- name: set install path for non-system installs
ansible.builtin.set_fact:
nerdfont_install_path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts"
when: not nerdfonts_system_install
- name: set install path for system wide installs
ansible.builtin.set_fact:
nerdfont_install_path: "/usr/local/share/fonts"
when: nerdfonts_system_install
- name: create nerdfonts directories
ansible.builtin.file:
path: "{{ nerdfonts_install_path }}/{{ font.name }}"
state: directory
become: nerdfonts_system_install
loop: "{{ nerdfonts }}"
loop_control:
loop_var: font
ansible.builtin.file:
path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts/{{ font.name }}"
state: directory
register: nerdfont_result
- name: Download and extract nerdfonts
ansible.builtin.unarchive:
creates: "{{ nerdfont_install_path }}/{{ font.name }}/README.md"
src: "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{ font.name }}.tar.xz"
dest: "{{ nerdfont_install_path }}/{{ font.name }}"
remote_src: true
when: nerdfont_result is changed
become: nerdfonts_system_install
loop: "{{ nerdfonts }}"
loop_control:
loop_var: font
ansible.builtin.unarchive:
creates: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts/{{ font.name }}/README.md"
src: "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{ font.name }}.tar.xz"
dest: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts/{{ font.name }}"
remote_src: true