You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4 KiB

10 months ago
---
- name: Set up fonts
vars:
10 months ago
uid: "{{ lookup('env','USER') }}"
10 months ago
font_name: UbuntuMono
font_path: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/{{ font_name }}.zip
10 months ago
font_size: 14
10 months ago
hosts: localhost
connection: local
become: false
tasks:
- name: Have font installed allready
stat:
path: /usr/local/share/fonts/{{ font_name }}
register: font
- name: Make font dir
ansible.builtin.file:
dest: /tmp/{{ font_name }}
state: directory
when: not font.stat.exists
- name: get font
ansible.builtin.command:
chdir: /tmp/{{ font_name }}
cmd: wget {{ font_path }}
when: not font.stat.exists
- name: unizip font
ansible.builtin.command:
chdir: /tmp/{{ font_name }}
cmd: unzip {{ font_name }}.zip
when: not font.stat.exists
10 months ago
- name: install font
10 months ago
become: true
ansible.builtin.command:
chdir: /tmp/
cmd: mv {{ font_name }} /usr/local/share/fonts/
when: not font.stat.exists
10 months ago
- name: make foot dir
ansible.builtin.file:
dest: /home/{{ uid }}/.config/foot
state: directory
- name: install foot config
ansible.builtin.template:
src: ../templates/foot.ini.j2
dest: /home/{{ uid }}/.config/foot/foot.ini
owner: '{{ uid }}'
group: '{{ uid }}'
mode: '0640'