mirror of
https://github.com/fscotto/infra.git
synced 2026-09-27 11:02:47 +00:00
Add profile for Fedora WSL
This commit is contained in:
@@ -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
|
||||
|
||||
33
README.md
33
README.md
@@ -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
|
||||
|
||||
@@ -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
|
||||
6
ansible/inventory/host_vars/deadalus-fedora-wsl.yml
Normal file
6
ansible/inventory/host_vars/deadalus-fedora-wsl.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
hostname: deadalus-fedora-wsl
|
||||
workstation_wsl_windows_user_home: /mnt/c/Users/FABIOSCOTTODISANTOLO
|
||||
|
||||
host_packages: []
|
||||
host_enabled_services: []
|
||||
@@ -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:
|
||||
|
||||
@@ -112,6 +112,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 +132,29 @@
|
||||
)
|
||||
+ (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([]))
|
||||
| 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
|
||||
tags: [packages]
|
||||
ansible.builtin.user:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user