working on nerdfonts still
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
- archive.name is defined
|
||||
- archive.url is defined
|
||||
block:
|
||||
- name: Dump archive vars
|
||||
ansible.builtin.debug:
|
||||
var: archive
|
||||
- name: Extract archive to given path
|
||||
block:
|
||||
- name: Ensure directory exists
|
||||
@@ -15,8 +18,8 @@
|
||||
state: directory
|
||||
path: "{{ archive.extract_to }}"
|
||||
mode: "{{ archive.mode | default('0755') }}"
|
||||
owner: "{{ archive.owner | default(ansible_user_id)}}"
|
||||
group: "{{ archive.group | default(ansible_user_gid) }}"
|
||||
owner: "{{ archive.owner | default(ansible_facts['user_id']) }}"
|
||||
group: "{{ archive.group | default(ansible_facts['user_gid']) }}"
|
||||
|
||||
- name: Download archive to cache
|
||||
ansible.builtin.get_url:
|
||||
|
||||
27
tasks/helpers/nerdfont_config.yml
Normal file
27
tasks/helpers/nerdfont_config.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
- name: Load nerdfonts list
|
||||
ansible.builtin.include_vars:
|
||||
file: nerdfonts.yml
|
||||
name: __nerdfonts
|
||||
|
||||
- name: Generate nerdfont configs
|
||||
when:
|
||||
- __nerdfonts[nf] is defined
|
||||
ansible.builtin.set_fact:
|
||||
__font_config:
|
||||
extract_to: "{{ path_archive }}/nerdfonts/{{ nf }}"
|
||||
url: "{{ nerdfonts_base_url }}/{{ __nerdfonts[nf]['archive'] | default(nf) }}.tar.xz"
|
||||
name: "{{ __nerdfonts[nf]['archive'] | default(nf) }}.tar.xz"
|
||||
links:
|
||||
- from: "{{ path_archive }}/nerdfonts/{{ nf }}"
|
||||
to: "{{ install_prefix }}/{{ nerdfonts_install_path }}/{{ nf }}"
|
||||
force: true
|
||||
|
||||
- name: Dump current nerdfont config
|
||||
ansible.builtin.debug:
|
||||
var: __font_config
|
||||
|
||||
- name: Append config to pkg archive
|
||||
ansible.builtin.set_fact:
|
||||
pkg_archive: "{{ pkg_archive + [__font_config] }}"
|
||||
Reference in New Issue
Block a user