feat: soporte para Ansible Execution Environments#13
Draft
juanpsm wants to merge 7 commits into
Draft
Conversation
- Corrige requirements para incluir community.general y formato correcto - Agrega opción workdir: null para evitar error de permisos en podman rootless - Agrega ansible-builder y ansible-navigator a pyproject.toml - Documenta opciones verificadas para vagrant, hosts remotos y localhost - Documenta limitación de imagen MW por SSH durante build
- execution-environment-mw.yml: inyecta clave SSH via --mount=type=secret para que ansible-galaxy clone mikroways.tools desde GitLab; formatea el RUN en múltiples líneas y usa gitlab_key como nombre explícito con config SSH - README: documenta build y uso de la imagen MW con vagrant; renombra vm-setup-ee → vm-setup y vm-setup-ee-mw → vm-setup-mw
…ments - .github/workflows/publish-ee.yml: publica vm-setup en ghcr.io al pushear un tag semver; job MW deshabilitado hasta confirmar permisos de packages - ansible/requirements/roles.yml y roles-mw.yml: ahora incluyen collections (community.general) para unificar con lo que usaba ansible-builder - ansible-builder/execution-environment*.yml: apuntan a ansible/requirements/ eliminando la duplicación de archivos - README: documenta ambas variantes (ghcr.io y local) para todos los comandos
- Nuevo ansible-navigator.yml con imagen ghcr.io, modo stdout, pull policy tag y pass-through de GITHUB_API_TOKEN - Nuevo ansible/inventory/vagrant.yml con todos los parámetros SSH de vagrant - Agregar workstation_github_api_token a localhost.yml - README: corregir nombres de archivos (roles.yml/roles-mw.yml), documentar defaults de ansible-navigator.yml, simplificar comandos vagrant con nuevo inventory, quitar --mode stdout y flags ya configurados como default
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4
¿Qué agrega este PR?
Permite correr los playbooks desde un contenedor usando
ansible-navigator.El contenedor ya incluye Ansible y todos los roles necesarios, por lo que no
hace falta instalarlos en el host.
Se definen dos variantes de imagen:
Imagen pública (
ghcr.io/mikroways/vm-setup): incluye solo el rol públicomikroways.workstation. Se publica automáticamente en GitHub Container Registryal crear un tag semver (
v1.2.3).Imagen privada (
vm-setup-mw): incluye además el rol privadomikroways.tools, alojado en GitLab. La clave SSH necesaria para clonarlose inyecta durante el build como secreto (
--mount=type=secret) y no quedaen la imagen final. Su publicación automática está pendiente de habilitar
(requiere confirmar permisos de packages privados en la org de GitHub).
Uso
El archivo
ansible-navigator.ymlconfigura los defaults para no tener querepetir flags en cada comando:
Si
GITHUB_API_TOKENestá definido en el entorno (via direnv), se pasaautomáticamente al contenedor para evitar rate limiting de GitHub al instalar
plugins de asdf.
Pendiente
permisos para packages privados en la organización de GitHub)
Supersede al PR #6.