diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-12-01 00:05:09 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-12-01 00:05:09 +0100 |
| commit | c93d91e4a0b61d90d9c2de140f750419c1a33735 (patch) | |
| tree | cfdc183b38f9cda85d66435d83dc879295325f63 | |
| parent | 4c2043dc1fa697c0cf2210d9466ff847b074cc34 (diff) | |
Add font configurations in a role
| -rw-r--r-- | configure.yml | 2 | ||||
| -rw-r--r-- | host_vars/archlinux.local.yml.example | 4 | ||||
| -rw-r--r-- | host_vars/ubuntu.local.yml.example | 4 | ||||
| -rw-r--r-- | molecule/archlinux/converge.yml | 1 | ||||
| -rw-r--r-- | molecule/debian/converge.yml | 1 | ||||
| -rw-r--r-- | molecule/raspberrypi/converge.yml | 1 | ||||
| -rw-r--r-- | molecule/ubuntu/converge.yml | 1 | ||||
| -rw-r--r-- | roles/fonts/defaults/main.yml | 2 | ||||
| -rw-r--r-- | roles/fonts/meta/argument_specs.yml | 11 | ||||
| -rw-r--r-- | roles/fonts/meta/main.yml | 18 | ||||
| -rw-r--r-- | roles/fonts/tasks/main.yml | 10 | ||||
| -rw-r--r-- | roles/fonts/vars/archlinux.yml | 5 | ||||
| -rw-r--r-- | roles/fonts/vars/debian.yml | 4 |
13 files changed, 64 insertions, 0 deletions
diff --git a/configure.yml b/configure.yml index d7d6cd07..0393c55d 100644 --- a/configure.yml +++ b/configure.yml @@ -9,6 +9,7 @@ - role: "locales" - role: "timezone" - role: "which" + - role: "fonts" - role: "wireguard" - role: "go" - role: "python" @@ -32,6 +33,7 @@ roles: - role: "locales" - role: "timezone" + - role: "fonts" - role: "wireguard" - role: "go" - role: "python" diff --git a/host_vars/archlinux.local.yml.example b/host_vars/archlinux.local.yml.example index 377e7a40..35568fca 100644 --- a/host_vars/archlinux.local.yml.example +++ b/host_vars/archlinux.local.yml.example @@ -24,3 +24,7 @@ wireguard_connections: PublicKey = server_public_key AllowedIPs = 0.0.0.0/0 Endpoint = vpn.com:51820 + +fonts_extra: + - "ttf-dejavu" + - "noto-fonts" diff --git a/host_vars/ubuntu.local.yml.example b/host_vars/ubuntu.local.yml.example index fa4fb83f..e39c17db 100644 --- a/host_vars/ubuntu.local.yml.example +++ b/host_vars/ubuntu.local.yml.example @@ -35,3 +35,7 @@ firefox_policies_override: DisableAppUpdate: true DisableFirefoxStudies: false DisableTelemetry: false + +fonts_extra: + - "fonts-font-awesome" + - "fonts-google-fira" diff --git a/molecule/archlinux/converge.yml b/molecule/archlinux/converge.yml index 3758251c..4dda5ceb 100644 --- a/molecule/archlinux/converge.yml +++ b/molecule/archlinux/converge.yml @@ -50,3 +50,4 @@ - role: "password_store" - role: "which" - role: "firefox" + - role: "fonts" diff --git a/molecule/debian/converge.yml b/molecule/debian/converge.yml index 4f303973..f6dd0f49 100644 --- a/molecule/debian/converge.yml +++ b/molecule/debian/converge.yml @@ -61,3 +61,4 @@ - role: "password_store" - role: "which" - role: "firefox" + - role: "fonts" diff --git a/molecule/raspberrypi/converge.yml b/molecule/raspberrypi/converge.yml index 5034deea..faa70653 100644 --- a/molecule/raspberrypi/converge.yml +++ b/molecule/raspberrypi/converge.yml @@ -51,3 +51,4 @@ - role: "password_store" - role: "which" - role: "firefox" + - role: "fonts" diff --git a/molecule/ubuntu/converge.yml b/molecule/ubuntu/converge.yml index 068bf7ab..0e4dd5c3 100644 --- a/molecule/ubuntu/converge.yml +++ b/molecule/ubuntu/converge.yml @@ -50,3 +50,4 @@ - role: "password_store" - role: "which" - role: "firefox" + - role: "fonts" diff --git a/roles/fonts/defaults/main.yml b/roles/fonts/defaults/main.yml new file mode 100644 index 00000000..fe3f29fa --- /dev/null +++ b/roles/fonts/defaults/main.yml @@ -0,0 +1,2 @@ +--- +fonts_extra: [] diff --git a/roles/fonts/meta/argument_specs.yml b/roles/fonts/meta/argument_specs.yml new file mode 100644 index 00000000..81440031 --- /dev/null +++ b/roles/fonts/meta/argument_specs.yml @@ -0,0 +1,11 @@ +--- +argument_specs: + main: + short_description: "Install fonts on Linux distributions" + description: "Install fonts on Linux distributions" + options: + fonts_extra: + type: "list" + description: "Extra font packages to install in addition to default fonts" + elements: "str" + default: [] diff --git a/roles/fonts/meta/main.yml b/roles/fonts/meta/main.yml new file mode 100644 index 00000000..155609ff --- /dev/null +++ b/roles/fonts/meta/main.yml @@ -0,0 +1,18 @@ +--- +dependencies: [] +galaxy_info: + author: "a14m" + description: "Install fonts on linux distros." + company: "kartoffeln.work GmbH." + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" + - name: "Ubuntu" + versions: + - "noble" + - name: "Debian" + versions: + - "bookworm" diff --git a/roles/fonts/tasks/main.yml b/roles/fonts/tasks/main.yml new file mode 100644 index 00000000..f2f0f72c --- /dev/null +++ b/roles/fonts/tasks/main.yml @@ -0,0 +1,10 @@ +--- +- name: "Include OS-specific variables" + ansible.builtin.include_vars: "{{ ansible_os_family | lower }}.yml" + +- name: "Ensure fonts are installed" + become: true + ansible.builtin.package: + name: "{{ item }}" + state: "present" + loop: "{{ fonts_default + fonts_extra }}" diff --git a/roles/fonts/vars/archlinux.yml b/roles/fonts/vars/archlinux.yml new file mode 100644 index 00000000..cc9342cb --- /dev/null +++ b/roles/fonts/vars/archlinux.yml @@ -0,0 +1,5 @@ +--- +fonts_default: + - "ttf-jetbrains-mono-nerd" + - "ttf-meslo-nerd" + - "ttf-dejavu-nerd" diff --git a/roles/fonts/vars/debian.yml b/roles/fonts/vars/debian.yml new file mode 100644 index 00000000..3e02137c --- /dev/null +++ b/roles/fonts/vars/debian.yml @@ -0,0 +1,4 @@ +--- +fonts_default: + - "fonts-jetbrains-mono" + - "fonts-dejavu" |
