Skip to content

Commit bd34ddf

Browse files
committed
chore: remove Ubuntu support, migrate to Debian-only
1 parent 19cea61 commit bd34ddf

15 files changed

Lines changed: 220 additions & 135 deletions

File tree

docs/debian-only-cleanup.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# Limpieza: Migración a solo Debian (eliminar soporte Ubuntu)
2+
3+
El proyecto actualmente solo se usa en Debian 13. Este documento lista todos los cambios
4+
necesarios para eliminar el código muerto de Ubuntu y dejar los roles limpios.
5+
6+
**Regla general:** si un bloque tiene `when: distribution == 'Ubuntu'` → se borra.
7+
Si tiene `when: distribution in ['Ubuntu', 'Debian']` → se simplifica a `when: distribution == 'Debian'`
8+
o se elimina la condición si solo queda Debian.
9+
10+
---
11+
12+
## GRUPO 1 — `roles/funcional/vars.yml`
13+
**Tipo:** Borrado puro de variables muertas. Sin riesgo, nada las referencia en Debian.
14+
15+
- [x] Borrar bloque `packages_ubuntu_common`
16+
- [x] Borrar bloque `packages_ubuntu_2204_power`
17+
- [x] Borrar bloque `funcional_gnome_extensions_ubuntu_2204` con su comentario
18+
- [x] Borrar bloque `funcional_gnome_extensions_ubuntu_2404` con su comentario
19+
- [x] Borrar bloque `language_packs_ubuntu`
20+
- [x] Borrar variable `snaps_to_remove` (solo la usaban las tasks snap de Ubuntu)
21+
22+
---
23+
24+
## GRUPO 2 — `roles/funcional/tasks/packages.yml`
25+
**Tipo:** Borrado de tasks que solo corren en Ubuntu. No tocan Debian.
26+
27+
- [x] Borrar task "Instalar paquetes específicos de Ubuntu"
28+
- [x] Borrar task "Verificar si snap está instalado"
29+
- [x] Borrar task "Eliminar programas snap no deseados"
30+
31+
---
32+
33+
## GRUPO 3 — `roles/funcional/tasks/language.yml`
34+
**Tipo:** Borrar task Ubuntu, simplificar condición Debian.
35+
36+
- [x] Borrar task "Instalar paquetes de idioma para Ubuntu"
37+
- [x] Eliminar `when: distribution == 'Debian'` de la task que quedó (innecesario si solo es Debian)
38+
- [x] Renombrar task a "Instalar paquetes de idioma" (sin mención de distro)
39+
40+
---
41+
42+
## GRUPO 4 — `roles/funcional/tasks/fixes.yml`
43+
**Tipo:** Mezcla de borrado y simplificación de condiciones.
44+
45+
- [x] Task "Aplicar aplicaciones favoritas del dock": simplificar `in ['Ubuntu', 'Debian']` → borrar condición de distro
46+
- [x] Borrar task completa "Configurar comportamiento del dock (dash-to-dock, solo Ubuntu)"
47+
- [x] Task "Forzar Xorg": simplificar `when` sacando la rama Ubuntu, renombrar task
48+
49+
---
50+
51+
## GRUPO 5 — `roles/funcional/tasks/gnome.yml`
52+
**Tipo:** Simplificar lógica del set_fact que construye la lista de extensiones.
53+
54+
- [x] Simplificar `set_fact` de extensiones: eliminar las dos condiciones Ubuntu del ternario,
55+
quedar solo con `funcional_gnome_extensions_common + funcional_gnome_extensions_debian`
56+
57+
---
58+
59+
## GRUPO 6 — `roles/funcional/tasks/local_dns.yml`
60+
**Tipo:** Decisión pendiente — el bloque está deshabilitado en Debian por problemas de conectividad.
61+
62+
El archivo tiene este estado actual:
63+
```yaml
64+
# TEMPORALMENTE DESHABILITADO EN DEBIAN: Causa problemas de conectividad
65+
# TODO: Investigar solución robusta para Debian
66+
when: ansible_facts['distribution'] == 'Ubuntu' ← bloque entero saltea en Debian
67+
```
68+
69+
- [ ] **Decidir:** ¿se quiere habilitar DNS para Debian en el futuro o se borra el bloque?
70+
- Si se habilita: resolver el problema de conectividad y cambiar la condición a Debian
71+
- Si se descarta: borrar el archivo o dejarlo vacío con un comentario explicativo
72+
73+
---
74+
75+
## GRUPO 7 — `roles/developer/tasks/fixes.yml`
76+
**Tipo:** Simplificar condición mixta.
77+
78+
- [x] Task "Establecer aplicaciones favoritas en el dock de GNOME": borrar `in ['Ubuntu', 'Debian']`
79+
80+
---
81+
82+
## GRUPO 8 — `roles/developer/vars.yml`
83+
**Tipo:** Simplificar variable condicional por versión de Ubuntu.
84+
85+
- [x] Simplificar ternario python-venv (`22.04 → python3.10-venv` / `24.04 → python3.12-venv` / `else → python3-venv`) a directamente `python3-venv`
86+
87+
---
88+
89+
## GRUPO 9 — Molecule converge.yml (tests CI)
90+
**Tipo:** Limpiar configuración de tests para que solo testeen Debian.
91+
92+
- [x] `roles/funcional/molecule/default/converge.yml` — sacado ternario Ubuntu, simplificado a lista YAML
93+
- [x] `roles/developer/molecule/default/converge.yml` — sacado ternario Ubuntu, simplificado a lista YAML
94+
- [x] `roles/freelance_developer/molecule/default/converge.yml` — sacado ternario Ubuntu, simplificado a lista YAML
95+
96+
---
97+
98+
## GRUPO 10 — `Makefile`
99+
**Tipo:** Eliminar targets que corren tests contra Ubuntu.
100+
101+
- [ ] Borrar targets `test-ubuntu2404` y `test-ubuntu2204`
102+
- [ ] Limpiar referencias a `docker pull geerlingguy/docker-ubuntu*-ansible`
103+
- [ ] Limpiar comentarios y mensajes `echo` que mencionan Ubuntu
104+
- [ ] Verificar que `make test` solo dispare Debian
105+
106+
---
107+
108+
## GRUPO 11 — `.github/workflows/molecule.yml`
109+
**Tipo:** Limpiar matriz CI para que solo corra contra Debian.
110+
111+
- [ ] Eliminar las distros Ubuntu de la matriz de testing
112+
- [ ] **NO TOCAR:** `runs-on: ubuntu-latest` → ese es el runner OS de GitHub Actions,
113+
no la distro que se testea. Es Ubuntu por la infra de GitHub, no por nuestro proyecto.
114+
115+
---
116+
117+
## GRUPO 12 — `.github/copilot-instructions.md`
118+
**Tipo:** Actualizar instrucciones para Copilot para reflejar solo-Debian.
119+
120+
- [ ] Quitar menciones a Ubuntu en las descripciones del proyecto
121+
- [ ] Actualizar ejemplos que comparen Debian vs Ubuntu
122+
- [ ] Sacar lógica específica de versiones Ubuntu (22.04, 24.04)
123+
124+
---
125+
126+
## GRUPO 13 — Documentación raíz
127+
**Tipo:** Actualizar docs para usuarios, sacar Ubuntu como distro soportada.
128+
129+
- [ ] `README.md` — quitar badges, secciones y referencias a Ubuntu (8 refs)
130+
- [ ] `specifications.md` — actualizar compatibilidad y versiones soportadas (3 refs)
131+
- [ ] `TESTING.md` — actualizar matriz de testing (1 ref)
132+
- [ ] `QUICKSTART_TESTING.md` — actualizar guía rápida (1 ref)
133+
- [ ] `roles/funcional/README.md` — limpiar README del rol (11 refs)
134+
135+
---
136+
137+
## GRUPO 14 — Documentación en `docs/`
138+
**Tipo:** Limpiar/decidir qué hacer con docs que mencionan Ubuntu.
139+
140+
Archivos afectados:
141+
- `docs/MOLECULE_GUIDE.md`
142+
- `docs/MULTI_DISTRO_TESTING.md` — ¿se borra entero? ya no es multi-distro
143+
- `docs/PROFILES.md`
144+
- `docs/LESSONS_LEARNED.md`
145+
- `docs/MEJORAS_ROL_FUNCIONAL.md`
146+
- `docs/CHANGELOG_MEJORAS_FUNCIONAL.md`
147+
- `docs/FREELANCE_DEVELOPER.md`
148+
- `docs/TESTING.md`
149+
- `docs/TEST_RUN_NOTES.md`
150+
- `docs/TESTING_IMPLEMENTATION_SUMMARY.md`
151+
- `docs/molecule-multi-distro-example.yml` — ¿borrar? es ejemplo multi-distro
152+
153+
- [ ] Revisar cada uno y actualizar/borrar según corresponda
154+
155+
---
156+
157+
## PENDIENTE — Verificación CI
158+
159+
- [ ] Correr `molecule test` en rol `funcional` y verificar que pasa verde
160+
- [ ] Correr `molecule test` en rol `developer` y verificar que pasa verde
161+
- [ ] Verificar que el workflow de GitHub Actions pasa después de los cambios CI
162+
163+
---
164+
165+
## Orden sugerido de ejecución
166+
167+
```
168+
✅ GRUPO 1 → vars.yml funcional (borrado puro, sin riesgo)
169+
✅ GRUPO 2 → packages.yml funcional (borrar tasks Ubuntu)
170+
✅ GRUPO 3 → language.yml funcional (borrar task + simplificar)
171+
✅ GRUPO 4 → fixes.yml funcional (borrar + simplificar Xorg)
172+
✅ GRUPO 5 → gnome.yml funcional (simplificar set_fact)
173+
✅ GRUPO 7 → fixes.yml developer (simplificar condición)
174+
✅ GRUPO 8 → vars.yml developer (simplificar python venv)
175+
⏳ GRUPO 6 → local_dns.yml (requiere decisión primero)
176+
✅ GRUPO 9 → Molecule converge.yml (3 archivos de test)
177+
⏳ GRUPO 10 → Makefile (sacar targets Ubuntu)
178+
⏳ GRUPO 11 → workflows/molecule.yml (sacar matriz Ubuntu)
179+
⏳ GRUPO 12 → copilot-instructions (actualizar contexto IA)
180+
⏳ GRUPO 13 → Docs raíz (README, specs, testing)
181+
⏳ GRUPO 14 → Docs en docs/ (limpiar guides y notes)
182+
```
183+
184+
Después de cada grupo de código: correr `molecule test` del rol afectado.
185+
Los grupos 12-14 son solo documentación y no requieren validación CI.

roles/developer/molecule/default/converge.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222

2323
- name: Install base dependencies for testing
2424
ansible.builtin.apt:
25-
name: >-
26-
{{
27-
['sudo', 'gnupg', 'lsb-release', 'dbus', 'ca-certificates', 'curl']
28-
+ (
29-
['software-properties-common']
30-
if ansible_facts['distribution'] == 'Ubuntu'
31-
else []
32-
)
33-
}}
25+
name:
26+
- sudo
27+
- gnupg
28+
- lsb-release
29+
- dbus
30+
- ca-certificates
31+
- curl
3432
state: present
3533

3634
roles:

roles/developer/molecule/default/molecule.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ provisioner:
2626
config_options:
2727
defaults:
2828
callbacks_enabled: timer, profile_tasks
29-
stdout_callback: yaml
29+
stdout_callback: default
30+
result_format: yaml
3031
roles_path: ../../../../roles
3132
inventory:
3233
host_vars:

roles/developer/tasks/fixes.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
community.general.dconf:
77
key: "/org/gnome/shell/favorite-apps"
88
value: "{{ developer_gnome_favorite_apps }}"
9-
when:
10-
- ansible_facts['distribution'] in ['Ubuntu', 'Debian']
11-
- not (skip_gnome_tasks | default(false))
9+
when: not (skip_gnome_tasks | default(false))
1210

1311
- name: Arreglos Dev | Copiar archivos de configuración del shell (dotfiles)
1412
tags: devs_fixes

roles/developer/vars.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ developer_python_packages:
7474
- python3-pip
7575
- pylint
7676
- python3
77-
- "{{ 'python3.10-venv' if ansible_facts['distribution_version'] == '22.04' else
78-
('python3.12-venv' if ansible_facts['distribution_version'] == '24.04' else
79-
'python3-venv') }}"
77+
- python3-venv
8078

8179
# Ruta para el entorno virtual de los linters
8280
developer_python_venv_path: "/home/{{ remote_regular_user }}/python-venvs/linters"

roles/freelance_developer/molecule/default/converge.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222

2323
- name: Install base dependencies for testing
2424
ansible.builtin.apt:
25-
name: >-
26-
{{
27-
['sudo', 'gnupg', 'lsb-release', 'dbus', 'ca-certificates', 'curl']
28-
+ (
29-
['software-properties-common']
30-
if ansible_facts['distribution'] == 'Ubuntu'
31-
else []
32-
)
33-
}}
25+
name:
26+
- sudo
27+
- gnupg
28+
- lsb-release
29+
- dbus
30+
- ca-certificates
31+
- curl
3432
state: present
3533

3634
roles:

roles/freelance_developer/molecule/default/molecule.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ provisioner:
2626
config_options:
2727
defaults:
2828
callbacks_enabled: timer, profile_tasks
29-
stdout_callback: yaml
29+
stdout_callback: default
30+
result_format: yaml
3031
roles_path: ../../../../roles
3132
inventory:
3233
host_vars:

roles/funcional/molecule/default/converge.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,11 @@
1919

2020
- name: Install basic dependencies for testing
2121
ansible.builtin.apt:
22-
name: >-
23-
{{
24-
['sudo', 'gnupg', 'lsb-release', 'dbus']
25-
+ (
26-
['software-properties-common']
27-
if ansible_facts['distribution'] == 'Ubuntu'
28-
else []
29-
)
30-
}}
22+
name:
23+
- sudo
24+
- gnupg
25+
- lsb-release
26+
- dbus
3127
state: present
3228

3329
roles:

roles/funcional/molecule/default/molecule.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ provisioner:
2626
config_options:
2727
defaults:
2828
callbacks_enabled: timer, profile_tasks
29-
stdout_callback: yaml
29+
stdout_callback: default
30+
result_format: yaml
3031
roles_path: ../../../../roles
3132
inventory:
3233
host_vars:

roles/funcional/tasks/fixes.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,14 @@
77
key: "/org/gnome/shell/favorite-apps"
88
value: "{{ gnome_functional_favorite_apps }}"
99
state: present
10-
when:
11-
- ansible_facts['distribution'] in ['Ubuntu', 'Debian']
12-
- not (skip_gnome_tasks | default(false))
10+
when: not (skip_gnome_tasks | default(false))
1311

14-
- name: Arreglos | Configurar comportamiento del dock (dash-to-dock, solo Ubuntu)
15-
tags: funcional_fixes, gnome
16-
become: true
17-
become_user: "{{ remote_regular_user }}"
18-
community.general.dconf:
19-
key: "/org/gnome/shell/extensions/dash-to-dock/click-action"
20-
value: "'minimize'"
21-
state: present
22-
when:
23-
- ansible_facts['distribution'] == 'Ubuntu'
24-
- not (skip_gnome_tasks | default(false))
25-
26-
- name: Arreglos | Forzar Xorg y reinstalar (Ubuntu 22.04+ y Debian 13+)
12+
- name: Arreglos | Instalar paquetes Xorg y forzar sesión (Debian 13+)
2713
tags: xorg_fixes
2814
become: true
2915
when: >
30-
(ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_version'] is version('22.04', '>=')) or
31-
(ansible_facts['distribution'] == 'Debian' and ansible_facts['distribution_version'] | int >= 13)
16+
ansible_facts['distribution'] == 'Debian' and
17+
ansible_facts['distribution_version'] | int >= 13
3218
block:
3319
- name: Arreglos | Instalar paquetes necesarios para sesiones Xorg
3420
ansible.builtin.apt:

0 commit comments

Comments
 (0)