Add profile for Fedora WSL

This commit is contained in:
Fabio Scotto di Santolo
2026-08-27 18:11:41 +02:00
parent 304479a3f9
commit 31bc8d07de
7 changed files with 86 additions and 19 deletions

View File

@@ -14,7 +14,7 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, FreeBS
- Current personal desktop: `ikaros = platform_fedora + role_personal_workstation + graphical_desktop + desktop_gnome` - Current personal desktop: `ikaros = platform_fedora + role_personal_workstation + graphical_desktop + desktop_gnome`
- Current laptop: `nymph = platform_fedora + graphical_desktop + desktop_gnome` - Current laptop: `nymph = platform_fedora + graphical_desktop + desktop_gnome`
- Void desktop profile is also the base for other future/reference hosts via `platform_void + graphical_desktop` - Void desktop profile is also the base for other future/reference hosts via `platform_void + graphical_desktop`
- Workstation: `deadalus` is Windows + WSL; Ansible target is `deadalus-wsl` - Workstation: `deadalus` is Windows + WSL; Ansible targets are `deadalus-wsl` (Ubuntu) and `deadalus-fedora-wsl` (Fedora)
- Ubuntu server: `prometheus` - Ubuntu server: `prometheus`
- Hosts intentionally belong to multiple groups; trust `ansible/site.yml` over hostname assumptions. - Hosts intentionally belong to multiple groups; trust `ansible/site.yml` over hostname assumptions.
- Inventory axes are independent: `platform_*`, `role_*`, and `desktop_*`. Legacy `void` and `desktop` remain compatibility parents. - Inventory axes are independent: `platform_*`, `role_*`, and `desktop_*`. Legacy `void` and `desktop` remain compatibility parents.
@@ -38,7 +38,8 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, FreeBS
- Host-focused dry runs: - Host-focused dry runs:
- Fedora desktop work: `ansible-playbook ansible/site.yml --limit ikaros --check --diff` - Fedora desktop work: `ansible-playbook ansible/site.yml --limit ikaros --check --diff`
- Fedora laptop work: `ansible-playbook ansible/site.yml --limit nymph --check --diff` - Fedora laptop work: `ansible-playbook ansible/site.yml --limit nymph --check --diff`
- WSL dev: `ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff` - Ubuntu WSL dev: `ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff`
- Fedora WSL dev: `ansible-playbook ansible/site.yml --limit deadalus-fedora-wsl --check --diff`
- Server: `ansible-playbook ansible/site.yml --limit prometheus --check --diff` - Server: `ansible-playbook ansible/site.yml --limit prometheus --check --diff`
- Focused checks: - Focused checks:
- Emacs is disabled by default; temporary Emacs check: `ansible-playbook ansible/site.yml --limit <host> --tags emacs --check --diff -e emacs_enabled=true` - Emacs is disabled by default; temporary Emacs check: `ansible-playbook ansible/site.yml --limit <host> --tags emacs --check --diff -e emacs_enabled=true`
@@ -79,7 +80,8 @@ The Void desktop package lists in `ansible/inventory/group_vars/void.yml` are ke
The dotfile vars follow the same split: `desktop_common_dotfiles` carries mode-independent content and `desktop_minimal_dotfiles` carries Thunar, Udiskie, and MIME defaults. `desktop_void_dotfiles` remains reserved for files that need the Void runtime. The dotfile vars follow the same split: `desktop_common_dotfiles` carries mode-independent content and `desktop_minimal_dotfiles` carries Thunar, Udiskie, and MIME defaults. `desktop_void_dotfiles` remains reserved for files that need the Void runtime.
## Workstation Notes ## Workstation Notes
- `deadalus` is modeled as Windows + WSL; keep Linux dev automation on `deadalus-wsl`. - `deadalus` is modeled as Windows + WSL; keep Linux dev automation on `deadalus-wsl` (Ubuntu) and `deadalus-fedora-wsl` (Fedora).
- Fedora WSL belongs to `platform_fedora`, `workstation_dev_fedora`, and the shared WSL layer. It must not receive Flatpak or Snap runtimes.
- Native Linux workstation groups remain available for future hosts but have no current host in the main inventory. - Native Linux workstation groups remain available for future hosts but have no current host in the main inventory.
## Coding Agent Notes ## Coding Agent Notes

View File

@@ -54,7 +54,7 @@ Il repository è diviso in due componenti principali:
# Macchine gestite # Macchine gestite
Il repository modella attualmente host Fedora/GNOME, un ambiente WSL di sviluppo e un server Ubuntu. Il repository modella attualmente host Fedora/GNOME, ambienti WSL di sviluppo Ubuntu e Fedora e un server Ubuntu.
La composizione resta separata in assi indipendenti: La composizione resta separata in assi indipendenti:
```text ```text
@@ -72,6 +72,7 @@ Matrice target:
| ikaros | Fedora | Personal workstation | GNOME | | ikaros | Fedora | Personal workstation | GNOME |
| nymph | Fedora | Desktop laptop | GNOME | | nymph | Fedora | Desktop laptop | GNOME |
| deadalus-wsl | Ubuntu | Workstation dev | — | | deadalus-wsl | Ubuntu | Workstation dev | — |
| deadalus-fedora-wsl | Fedora | Workstation dev WSL | — |
| prometheus | Ubuntu | Server | — | | prometheus | Ubuntu | Server | — |
Regola operativa: Regola operativa:
@@ -89,7 +90,7 @@ compatibilita per eventuali host Void futuri mentre i nuovi assi sono
Nota sullo stato attuale del playbook principale: Nota sullo stato attuale del playbook principale:
- `ansible/site.yml` applica oggi in automatico Fedora/GNOME su `ikaros` e `nymph` - `ansible/site.yml` applica oggi in automatico Fedora/GNOME su `ikaros` e `nymph`
- `ansible/site.yml` applica anche il ramo `workstation_dev_wsl` per il modello dev in WSL - `ansible/site.yml` applica i rami WSL Ubuntu e Fedora per il modello dev in WSL
- `ansible/site.yml` applica anche il profilo `ubuntu_server` con baseline apt, systemd, dotfiles server e firewall UFW - `ansible/site.yml` applica anche il profilo `ubuntu_server` con baseline apt, systemd, dotfiles server e firewall UFW
## Desktop ## Desktop
@@ -128,7 +129,8 @@ Lo stato attuale del profilo desktop include, tra le altre cose:
Sistemi operativi supportati: Sistemi operativi supportati:
- Ubuntu WSL, attualmente usato da `deadalus-wsl` - Ubuntu WSL, usato da `deadalus-wsl`
- Fedora WSL, usato da `deadalus-fedora-wsl`
- Fedora Workstation nativa, disponibile per host futuri tramite gruppi dedicati - Fedora Workstation nativa, disponibile per host futuri tramite gruppi dedicati
Desktop environment host Linux, per eventuali workstation native: Desktop environment host Linux, per eventuali workstation native:
@@ -138,6 +140,7 @@ Desktop environment host Linux, per eventuali workstation native:
Macchine attuali: Macchine attuali:
- `deadalus-wsl` come ambiente dev Ubuntu in WSL sulla workstation Windows `deadalus` - `deadalus-wsl` come ambiente dev Ubuntu in WSL sulla workstation Windows `deadalus`
- `deadalus-fedora-wsl` come clone dev Fedora in WSL sulla workstation Windows `deadalus`, senza runtime Flatpak o Snap
Questo profilo è pensato per sviluppo e lavoro, con separazione tra layer host e layer dev. Questo profilo è pensato per sviluppo e lavoro, con separazione tra layer host e layer dev.
@@ -160,14 +163,14 @@ Lo stato attuale del profilo workstation include:
- gestione dei dotfiles workstation e rendering dei template dev condivisi - gestione dei dotfiles workstation e rendering dei template dev condivisi
- installazione opzionale di Google Chrome, VS Code, IntelliJ IDEA Ultimate e applicazioni Flatpak per eventuali workstation Fedora native - installazione opzionale di Google Chrome, VS Code, IntelliJ IDEA Ultimate e applicazioni Flatpak per eventuali workstation Fedora native
- estensioni GNOME per eventuali host Linux nativi - estensioni GNOME per eventuali host Linux nativi
- preparazione del ramo WSL Ubuntu con `systemd` per il toolchain di sviluppo - preparazione dei rami WSL Ubuntu e Fedora con `systemd` per il toolchain di sviluppo
- attivazione del firewall `firewalld` sui target Fedora che dichiarano regole host-specifiche - attivazione del firewall `firewalld` sui target Fedora che dichiarano regole host-specifiche
Workflow WSL previsto: Workflow WSL previsto:
1. avviare Ubuntu WSL almeno una volta e completare la creazione dell'utente Linux 1. avviare la distribuzione WSL scelta almeno una volta e completare la creazione dell'utente Linux
2. installare Ansible dentro WSL Ubuntu 2. installare Ansible dentro la distribuzione WSL
3. lanciare il playbook da WSL su `deadalus-wsl` per configurare l'ambiente dev locale 3. lanciare il playbook dalla distribuzione su `deadalus-wsl` oppure `deadalus-fedora-wsl` per configurare l'ambiente dev locale
4. usare VS Code con le estensioni Remote (`WSL`, `SSH`, `Dev Containers`) dal lato Windows 4. usare VS Code con le estensioni Remote (`WSL`, `SSH`, `Dev Containers`) dal lato Windows
--- ---
@@ -238,6 +241,7 @@ Esempi correnti:
```text ```text
ikaros -> common + platform_fedora + role_personal_workstation + graphical_desktop + desktop_gnome + ikaros ikaros -> common + platform_fedora + role_personal_workstation + graphical_desktop + desktop_gnome + ikaros
nymph -> common + platform_fedora + graphical_desktop + desktop_gnome + nymph nymph -> common + platform_fedora + graphical_desktop + desktop_gnome + nymph
deadalus-fedora-wsl -> common + platform_fedora + workstation_dev_fedora + workstation_dev_wsl + deadalus-fedora-wsl
``` ```
Questo approccio consente di: Questo approccio consente di:
@@ -272,7 +276,7 @@ I principali ruoli attualmente presenti sono:
| profile_personal_workstation | layer stabile per workstation personale | | profile_personal_workstation | layer stabile per workstation personale |
| profile_workstation_dev_common | configurazione dev workstation condivisa | | profile_workstation_dev_common | configurazione dev workstation condivisa |
| profile_workstation_gnome | configurazione host workstation GNOME | | profile_workstation_gnome | configurazione host workstation GNOME |
| profile_workstation_dev_wsl | configurazione WSL Ubuntu per sviluppo | | profile_workstation_dev_wsl | configurazione WSL condivisa per sviluppo |
| profile_server | configurazione server | | profile_server | configurazione server |
| dotfiles_common | distribuzione dotfiles comuni | | dotfiles_common | distribuzione dotfiles comuni |
| dotfiles | distribuzione configurazioni utente | | dotfiles | distribuzione configurazioni utente |
@@ -293,7 +297,8 @@ platform_fedora & role_personal_workstation -> profile_personal_workstation
platform_fedora & desktop_gnome -> profile_desktop_gnome platform_fedora & desktop_gnome -> profile_desktop_gnome
workstation_dev_fedora -> profile_workstation_dev_common workstation_dev_fedora -> profile_workstation_dev_common
workstation_host_linux -> profile_workstation_gnome workstation_host_linux -> profile_workstation_gnome
workstation_dev_wsl -> packages_ubuntu + services_systemd + profile_workstation_dev_common + profile_workstation_dev_wsl workstation_dev_wsl_ubuntu -> packages_ubuntu + services_systemd + profile_workstation_dev_common + profile_workstation_dev_wsl
workstation_dev_wsl_fedora -> profile_workstation_dev_wsl (dopo platform_fedora + workstation_dev_fedora)
ubuntu_server -> packages_ubuntu + services_systemd + profile_server ubuntu_server -> packages_ubuntu + services_systemd + profile_server
``` ```
@@ -302,7 +307,7 @@ Questo significa che, allo stato attuale:
- `ikaros` riceve Fedora Workstation/GNOME come target desktop personale stabile - `ikaros` riceve Fedora Workstation/GNOME come target desktop personale stabile
- `nymph` riceve Fedora Workstation/GNOME come target laptop - `nymph` riceve Fedora Workstation/GNOME come target laptop
- il profilo Void resta selezionabile tramite `platform_void + graphical_desktop` per host futuri - il profilo Void resta selezionabile tramite `platform_void + graphical_desktop` per host futuri
- il ramo WSL (`deadalus-wsl`) e predisposto con play dev dedicato - i rami WSL Ubuntu (`deadalus-wsl`) e Fedora (`deadalus-fedora-wsl`) sono predisposti con play dev dedicati
- il server Ubuntu (`prometheus`) e gestito con pacchetti, servizi, dotfiles server e firewall - il server Ubuntu (`prometheus`) e gestito con pacchetti, servizi, dotfiles server e firewall
- lo stack container server include `navidrome`, `postgres`, `gitea`, `nginx-proxy-manager` e `syncthing`, con GUI Syncthing raggiungibile tramite la rete Docker `web` - lo stack container server include `navidrome`, `postgres`, `gitea`, `nginx-proxy-manager` e `syncthing`, con GUI Syncthing raggiungibile tramite la rete Docker `web`
@@ -375,11 +380,12 @@ Allo stato attuale questo comando:
- distribuisce i dotfiles comuni a tutti gli host - distribuisce i dotfiles comuni a tutti gli host
- per `platform_void` applica pacchetti Void e servizi runit - per `platform_void` applica pacchetti Void e servizi runit
- per `platform_void + graphical_desktop` applica bootstrap desktop condiviso, sessioni Sway/Niri e override specifici per host - per `platform_void + graphical_desktop` applica bootstrap desktop condiviso, sessioni Sway/Niri e override specifici per host
- per `platform_freebsd`, `workstation_dev_fedora` e `workstation_host_linux` non applica nulla finche quei gruppi restano senza host - per `platform_freebsd` e `workstation_host_linux` non applica nulla finche quei gruppi restano senza host
- per `platform_fedora` applica pacchetti Fedora e servizi systemd a `ikaros` e `nymph` - per `platform_fedora` applica pacchetti Fedora e servizi systemd a `ikaros`, `nymph` e `deadalus-fedora-wsl`
- per `platform_fedora & role_personal_workstation` applica il layer personale a `ikaros` - per `platform_fedora & role_personal_workstation` applica il layer personale a `ikaros`
- per `platform_fedora & desktop_gnome` applica il profilo GNOME a `ikaros` e `nymph` - per `platform_fedora & desktop_gnome` applica il profilo GNOME a `ikaros` e `nymph`
- per `workstation_dev_wsl` applica pacchetti Ubuntu, servizi systemd, profilo dev comune e tweak WSL dedicati a `deadalus-wsl` - per `workstation_dev_wsl_ubuntu` applica pacchetti Ubuntu, servizi systemd, profilo dev comune e tweak WSL a `deadalus-wsl`
- per `workstation_dev_wsl_fedora` applica i tweak WSL dopo il layer Fedora a `deadalus-fedora-wsl`, escludendo Flatpak e Snap
- per gli host `ubuntu_server` applica pacchetti Ubuntu, servizi systemd, profilo server, UFW, dotfiles e template dedicati - per gli host `ubuntu_server` applica pacchetti Ubuntu, servizi systemd, profilo server, UFW, dotfiles e template dedicati
- non riavvia automaticamente il display manager - non riavvia automaticamente il display manager
- carica `secrets/vault.yml` solo se presente - carica `secrets/vault.yml` solo se presente
@@ -393,6 +399,7 @@ ansible-playbook ansible/site.yml --limit ikaros,nymph --check --diff
ansible-playbook ansible/site.yml --limit ikaros --check --diff ansible-playbook ansible/site.yml --limit ikaros --check --diff
ansible-playbook ansible/site.yml --limit nymph --check --diff ansible-playbook ansible/site.yml --limit nymph --check --diff
ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff ansible-playbook ansible/site.yml --limit deadalus-wsl --check --diff
ansible-playbook ansible/site.yml --limit deadalus-fedora-wsl --check --diff
ansible-playbook ansible/site.yml --limit prometheus --check --diff ansible-playbook ansible/site.yml --limit prometheus --check --diff
ansible-lint ansible/site.yml ansible-lint ansible/site.yml
ansible-lint ansible/roles ansible-lint ansible/roles

View File

@@ -0,0 +1,8 @@
---
# Fedora WSL mirrors the Ubuntu WSL development profile without installing
# alternative application runtimes.
fedora_excluded_packages:
- flatpak
fedora_removed_packages:
- flatpak
- snapd

View File

@@ -0,0 +1,6 @@
---
hostname: deadalus-fedora-wsl
workstation_wsl_windows_user_home: /mnt/c/Users/FABIOSCOTTODISANTOLO
host_packages: []
host_enabled_services: []

View File

@@ -10,6 +10,8 @@ all:
ansible_connection: local ansible_connection: local
nymph: nymph:
ansible_connection: local ansible_connection: local
deadalus-fedora-wsl:
ansible_connection: local
platform_freebsd: platform_freebsd:
hosts: {} hosts: {}
@@ -53,7 +55,7 @@ all:
ubuntu: ubuntu:
children: children:
workstation_dev_wsl: workstation_dev_wsl_ubuntu:
ubuntu_server: ubuntu_server:
workstation: workstation:
@@ -81,13 +83,24 @@ all:
hosts: {} hosts: {}
workstation_dev_fedora: workstation_dev_fedora:
hosts: {} children:
workstation_dev_wsl_fedora:
workstation_dev_wsl: workstation_dev_wsl:
children:
workstation_dev_wsl_ubuntu:
workstation_dev_wsl_fedora:
workstation_dev_wsl_ubuntu:
hosts: hosts:
deadalus-wsl: deadalus-wsl:
ansible_connection: local ansible_connection: local
workstation_dev_wsl_fedora:
hosts:
deadalus-fedora-wsl:
ansible_connection: local
ubuntu_server: ubuntu_server:
hosts: hosts:
prometheus: prometheus:

View File

@@ -112,6 +112,11 @@
if 'workstation_dev_fedora' in group_names if 'workstation_dev_fedora' in group_names
else [] else []
) )
+ (
(workstation_dev_wsl_packages | default([]))
if 'workstation_dev_wsl' in group_names
else []
)
+ ( + (
(workstation_host_linux_packages_fedora | default(workstation_host_linux_packages | default([]))) (workstation_host_linux_packages_fedora | default(workstation_host_linux_packages | default([])))
if 'workstation_host_linux' in group_names if 'workstation_host_linux' in group_names
@@ -127,10 +132,29 @@
) )
+ (host_packages | default([])) + (host_packages | default([]))
) )
| difference(fedora_excluded_packages | default([]))
| unique | unique
}} }}
state: present state: present
- name: Remove excluded Fedora packages
tags: [packages]
ansible.builtin.dnf:
name: >-
{{
(fedora_removed_packages | default([]))
| select('in', ansible_facts.packages | default({}))
| list
}}
state: absent
when: >-
(
(fedora_removed_packages | default([]))
| select('in', ansible_facts.packages | default({}))
| list
| length
) > 0
- name: Add user to docker group - name: Add user to docker group
tags: [packages] tags: [packages]
ansible.builtin.user: ansible.builtin.user:

View File

@@ -77,6 +77,13 @@
roles: roles:
- profile_workstation_dev_common - profile_workstation_dev_common
- name: Configure Fedora WSL workstation development layer
hosts: workstation_dev_wsl_fedora
become: true
roles:
- profile_workstation_dev_wsl
- name: Configure native Linux workstation host layer - name: Configure native Linux workstation host layer
hosts: workstation_host_linux hosts: workstation_host_linux
become: true become: true
@@ -85,7 +92,7 @@
- profile_workstation_gnome - profile_workstation_gnome
- name: Configure WSL workstation development layer - name: Configure WSL workstation development layer
hosts: workstation_dev_wsl hosts: workstation_dev_wsl_ubuntu
become: true become: true
roles: roles: