Merge branch 'feature/fedora-wsl'

This commit is contained in:
Fabio Scotto di Santolo
2026-08-27 22:41:10 +02:00
7 changed files with 172 additions and 24 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 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`
- 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`
- 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.
@@ -38,7 +38,8 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, FreeBS
- Host-focused dry runs:
- Fedora desktop work: `ansible-playbook ansible/site.yml --limit ikaros --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`
- 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`
@@ -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.
## 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.
## Coding Agent Notes

View File

@@ -54,7 +54,7 @@ Il repository è diviso in due componenti principali:
# 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:
```text
@@ -72,6 +72,7 @@ Matrice target:
| ikaros | Fedora | Personal workstation | GNOME |
| nymph | Fedora | Desktop laptop | GNOME |
| deadalus-wsl | Ubuntu | Workstation dev | — |
| deadalus-fedora-wsl | Fedora | Workstation dev WSL | — |
| prometheus | Ubuntu | Server | — |
Regola operativa:
@@ -89,7 +90,7 @@ compatibilita per eventuali host Void futuri mentre i nuovi assi sono
Nota sullo stato attuale del playbook principale:
- `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
## Desktop
@@ -128,7 +129,8 @@ Lo stato attuale del profilo desktop include, tra le altre cose:
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
Desktop environment host Linux, per eventuali workstation native:
@@ -138,6 +140,7 @@ Desktop environment host Linux, per eventuali workstation native:
Macchine attuali:
- `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.
@@ -160,14 +163,14 @@ Lo stato attuale del profilo workstation include:
- 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
- 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
Workflow WSL previsto:
1. avviare Ubuntu WSL almeno una volta e completare la creazione dell'utente Linux
2. installare Ansible dentro WSL Ubuntu
3. lanciare il playbook da WSL su `deadalus-wsl` per configurare l'ambiente dev locale
1. avviare la distribuzione WSL scelta almeno una volta e completare la creazione dell'utente Linux
2. installare Ansible dentro la distribuzione WSL
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
---
@@ -238,6 +241,7 @@ Esempi correnti:
```text
ikaros -> common + platform_fedora + role_personal_workstation + graphical_desktop + desktop_gnome + ikaros
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:
@@ -272,7 +276,7 @@ I principali ruoli attualmente presenti sono:
| profile_personal_workstation | layer stabile per workstation personale |
| profile_workstation_dev_common | configurazione dev workstation condivisa |
| 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 |
| dotfiles_common | distribuzione dotfiles comuni |
| dotfiles | distribuzione configurazioni utente |
@@ -293,7 +297,8 @@ platform_fedora & role_personal_workstation -> profile_personal_workstation
platform_fedora & desktop_gnome -> profile_desktop_gnome
workstation_dev_fedora -> profile_workstation_dev_common
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
```
@@ -302,7 +307,7 @@ Questo significa che, allo stato attuale:
- `ikaros` riceve Fedora Workstation/GNOME come target desktop personale stabile
- `nymph` riceve Fedora Workstation/GNOME come target laptop
- 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
- 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
- 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_freebsd`, `workstation_dev_fedora` 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_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`, `nymph` e `deadalus-fedora-wsl`
- 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 `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
- non riavvia automaticamente il display manager
- 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 nymph --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-lint ansible/site.yml
ansible-lint ansible/roles

View File

@@ -0,0 +1,11 @@
---
# Fedora WSL mirrors the Ubuntu WSL development profile without installing
# alternative application runtimes.
fedora_excluded_packages:
- flatpak
- lazygit
fedora_removed_packages:
- flatpak
- snapd
fedora_manage_lazygit: true
fedora_lazygit_version: 0.64.1

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
nymph:
ansible_connection: local
deadalus-fedora-wsl:
ansible_connection: local
platform_freebsd:
hosts: {}
@@ -53,7 +55,7 @@ all:
ubuntu:
children:
workstation_dev_wsl:
workstation_dev_wsl_ubuntu:
ubuntu_server:
workstation:
@@ -81,13 +83,24 @@ all:
hosts: {}
workstation_dev_fedora:
hosts: {}
children:
workstation_dev_wsl_fedora:
workstation_dev_wsl:
children:
workstation_dev_wsl_ubuntu:
workstation_dev_wsl_fedora:
workstation_dev_wsl_ubuntu:
hosts:
deadalus-wsl:
ansible_connection: local
workstation_dev_wsl_fedora:
hosts:
deadalus-fedora-wsl:
ansible_connection: local
ubuntu_server:
hosts:
prometheus:

View File

@@ -1,9 +1,4 @@
---
- name: Gather installed package facts
tags: [packages]
ansible.builtin.package_facts:
manager: auto
- name: Copy Fedora dotfiles
tags: [dotfiles, dotfiles:common]
ansible.builtin.copy:
@@ -112,6 +107,11 @@
if 'workstation_dev_fedora' in group_names
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([])))
if 'workstation_host_linux' in group_names
@@ -127,10 +127,112 @@
)
+ (host_packages | default([]))
)
| difference(fedora_excluded_packages | default([]))
| unique
}}
state: present
- name: Remove excluded Fedora packages
tags: [packages]
ansible.builtin.dnf:
name: "{{ fedora_removed_packages | default([]) }}"
state: absent
when: (fedora_removed_packages | default([])) | length > 0
- name: Ensure architecture is supported for LazyGit release
tags: [packages]
ansible.builtin.fail:
msg: "Unsupported architecture {{ ansible_facts['architecture'] }} for LazyGit release"
when:
- fedora_manage_lazygit | default(false)
- ansible_facts['architecture'] not in ['x86_64', 'aarch64', 'arm64']
- name: Read installed LazyGit version
tags: [packages]
ansible.builtin.command: /usr/local/bin/lazygit --version
register: fedora_lazygit_version_check
changed_when: false
failed_when: false
check_mode: false
when: fedora_manage_lazygit | default(false)
- name: Ensure temporary LazyGit extraction directory is absent
tags: [packages]
ansible.builtin.file:
path: "/tmp/lazygit_{{ fedora_lazygit_version }}"
state: absent
when:
- fedora_manage_lazygit | default(false)
- fedora_lazygit_version not in (fedora_lazygit_version_check.stdout | default(''))
- name: Create temporary LazyGit extraction directory
tags: [packages]
ansible.builtin.file:
path: "/tmp/lazygit_{{ fedora_lazygit_version }}"
state: directory
owner: root
group: root
mode: "0755"
when:
- fedora_manage_lazygit | default(false)
- fedora_lazygit_version not in (fedora_lazygit_version_check.stdout | default(''))
- name: Download LazyGit release archive
tags: [packages]
ansible.builtin.get_url:
url: >-
https://github.com/jesseduffield/lazygit/releases/download/v{{ fedora_lazygit_version }}/lazygit_{{
fedora_lazygit_version }}_Linux_{{
'x86_64' if ansible_facts['architecture'] == 'x86_64'
else 'arm64'
}}.tar.gz
dest: "/tmp/lazygit_{{ fedora_lazygit_version }}.tar.gz"
mode: "0644"
when:
- fedora_manage_lazygit | default(false)
- fedora_lazygit_version not in (fedora_lazygit_version_check.stdout | default(''))
- name: Extract LazyGit release archive
tags: [packages]
ansible.builtin.unarchive:
src: "/tmp/lazygit_{{ fedora_lazygit_version }}.tar.gz"
dest: "/tmp/lazygit_{{ fedora_lazygit_version }}"
remote_src: true
when:
- fedora_manage_lazygit | default(false)
- fedora_lazygit_version not in (fedora_lazygit_version_check.stdout | default(''))
- name: Install LazyGit binary
tags: [packages]
ansible.builtin.copy:
src: "/tmp/lazygit_{{ fedora_lazygit_version }}/lazygit"
dest: /usr/local/bin/lazygit
owner: root
group: root
mode: "0755"
remote_src: true
when:
- fedora_manage_lazygit | default(false)
- fedora_lazygit_version not in (fedora_lazygit_version_check.stdout | default(''))
- name: Remove downloaded LazyGit archive
tags: [packages]
ansible.builtin.file:
path: "/tmp/lazygit_{{ fedora_lazygit_version }}.tar.gz"
state: absent
when:
- fedora_manage_lazygit | default(false)
- fedora_lazygit_version not in (fedora_lazygit_version_check.stdout | default(''))
- name: Remove temporary LazyGit extraction directory
tags: [packages]
ansible.builtin.file:
path: "/tmp/lazygit_{{ fedora_lazygit_version }}"
state: absent
when:
- fedora_manage_lazygit | default(false)
- fedora_lazygit_version not in (fedora_lazygit_version_check.stdout | default(''))
- name: Add user to docker group
tags: [packages]
ansible.builtin.user:

View File

@@ -77,6 +77,13 @@
roles:
- 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
hosts: workstation_host_linux
become: true
@@ -85,7 +92,7 @@
- profile_workstation_gnome
- name: Configure WSL workstation development layer
hosts: workstation_dev_wsl
hosts: workstation_dev_wsl_ubuntu
become: true
roles: