configuring more packages
This commit is contained in:
@@ -1,33 +1,36 @@
|
||||
# Install nerdfonts for each platform
|
||||
---
|
||||
- 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
|
||||
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
|
||||
- name: linux installation
|
||||
when: ansible_system == 'Linux'
|
||||
block:
|
||||
- name: set install path for non-system installs
|
||||
ansible.builtin.set_fact:
|
||||
nerdfonts_install_path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.local/share/fonts"
|
||||
when: not _nerdfonts.nerdfonts_system_install
|
||||
|
||||
- name: set install path for system wide installs
|
||||
ansible.builtin.set_fact:
|
||||
nerdfonts_install_path: "/usr/local/share/fonts"
|
||||
when: _nerdfonts.nerdfonts_system_install
|
||||
|
||||
- name: create nerdfonts directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ nerdfonts_install_path }}/{{ font.name }}"
|
||||
state: directory
|
||||
become: "{{ _nerdfonts.nerdfonts_system_install }}"
|
||||
loop: "{{ nerdfonts }}"
|
||||
loop_control:
|
||||
loop_var: font
|
||||
register: nerdfont_result
|
||||
|
||||
- name: Download and extract nerdfonts
|
||||
ansible.builtin.unarchive:
|
||||
creates: "{{ nerdfonts_install_path }}/{{ font.name }}/README.md"
|
||||
src: "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{ font.name }}.tar.xz"
|
||||
dest: "{{ nerdfonts_install_path }}/{{ font.name }}"
|
||||
remote_src: true
|
||||
when: nerdfont_result is changed
|
||||
become: nerdfonts_system_install
|
||||
loop: "{{ _nerdfonts.fonts }}"
|
||||
loop_control:
|
||||
loop_var: font
|
||||
|
||||
Reference in New Issue
Block a user