-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmolecule-multi-distro-example.yml
More file actions
147 lines (135 loc) · 3.75 KB
/
molecule-multi-distro-example.yml
File metadata and controls
147 lines (135 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
# Ejemplo de molecule.yml con múltiples distribuciones
# Ubicación: roles/funcional/molecule/default/molecule.yml
#
# INSTRUCCIONES DE USO:
# 1. Por defecto, mantener solo Debian 12 + Ubuntu 22.04 (rápido)
# 2. Para validación completa, descomentar Debian 13 y Ubuntu 24.04
# 3. Verificar disponibilidad de imágenes Docker antes de agregar
dependency:
name: galaxy
options:
requirements-file: ../../../../collections/requirements.yml
force: false
driver:
name: docker
platforms:
# ============================================
# PLATAFORMAS POR DEFECTO (siempre activas)
# ============================================
- name: debian13-funcional
image: geerlingguy/docker-debian13-ansible:latest
command: ""
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
tmpfs:
- /run
- /tmp
- name: ubuntu2204-funcional
image: geerlingguy/docker-ubuntu2204-ansible:latest
command: ""
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
tmpfs:
- /run
- /tmp
# ============================================
# PLATAFORMAS ADICIONALES (descomentar según necesidad)
# ============================================
# Debian 13 (Trixie) - Testing/Unstable
# ⚠️ Verificar disponibilidad: docker pull geerlingguy/docker-debian13-ansible:latest
# ⚠️ Algunos paquetes pueden no estar disponibles
# - name: debian13-funcional
# image: geerlingguy/docker-debian13-ansible:latest
# command: ""
# volumes:
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
# cgroupns_mode: host
# privileged: true
# pre_build_image: true
# tmpfs:
# - /run
# - /tmp
# Ubuntu 24.04 LTS (Noble)
# ✅ Estable y totalmente soportado
# ✅ Recomendado para validación de compatibilidad LTS
# - name: ubuntu2404-funcional
# image: geerlingguy/docker-ubuntu2404-ansible:latest
# command: ""
# volumes:
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
# cgroupns_mode: host
# privileged: true
# pre_build_image: true
# tmpfs:
# - /run
# - /tmp
provisioner:
name: ansible
config_options:
defaults:
callbacks_enabled: timer, profile_tasks
stdout_callback: yaml
roles_path: ../../../../roles
inventory:
host_vars:
debian13-funcional:
ansible_user: root
ubuntu2204-funcional:
ansible_user: root
# Descomentar si activas las plataformas adicionales:
# debian13-funcional:
# ansible_user: root
# ubuntu2404-funcional:
# ansible_user: root
playbooks:
converge: converge.yml
verifier:
name: ansible
scenario:
name: default
test_sequence:
- dependency
- syntax
- create
- prepare
- converge
- idempotence
- verify
- destroy
# NOTAS DE USO:
#
# 1. Testing con 2 distros (rápido - ~15 min):
# molecule test
#
# 2. Testing con 4 distros (completo - ~35 min):
# - Descomentar debian13 y ubuntu2404 arriba
# - molecule test
#
# 3. Testing de una sola distro:
# molecule create --platform-name ubuntu2404-funcional
# molecule converge --platform-name ubuntu2404-funcional
# molecule verify --platform-name ubuntu2404-funcional
# molecule destroy --platform-name ubuntu2404-funcional
#
# 4. Ver todas las plataformas:
# molecule list
#
# 5. Logs de un contenedor:
# docker logs debian13-funcional
#
# TIEMPO ESTIMADO POR DISTRO:
# - Primera ejecución: ~8-10 minutos
# - Idempotencia: ~2-3 minutos
# - Verify: ~30 segundos
#
# RECOMENDACIONES:
# - Desarrollo diario: 2 distros (Debian 12 + Ubuntu 22.04)
# - Pull Requests: 3 distros (+ Ubuntu 24.04)
# - Releases: 4 distros (si Debian 13 disponible)