diff --git a/playbooks/apt.yaml b/playbooks/apt.yaml index 9b4c2e6..2e48986 100644 --- a/playbooks/apt.yaml +++ b/playbooks/apt.yaml @@ -31,6 +31,7 @@ - sway-notification-center - swayidle - swaylock + - unzip - waybar - wget - wl-clipboard diff --git a/playbooks/fonts.yaml b/playbooks/fonts.yaml new file mode 100644 index 0000000..0d33927 --- /dev/null +++ b/playbooks/fonts.yaml @@ -0,0 +1,34 @@ +--- +- name: Set up fonts + vars: + font_name: UbuntuMono + font_path: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/{{ font_name }}.zip + 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 + - name: unizip font + become: true + ansible.builtin.command: + chdir: /tmp/ + cmd: mv {{ font_name }} /usr/local/share/fonts/ + when: not font.stat.exists diff --git a/setup.yaml b/setup.yaml index 4a06e12..06f4f5c 100644 --- a/setup.yaml +++ b/setup.yaml @@ -1,5 +1,6 @@ --- - import_playbook: playbooks/env.yaml +- import_playbook: playbooks/fonts.yaml - import_playbook: playbooks/apt.yaml - import_playbook: playbooks/nvim.yaml - import_playbook: playbooks/zsh.yaml