Add recipe generator for automation and DRY recipes

- create generate_recipe.py: CLI tool for generating recipes from templates
- add recipe_templates.yaml: 5 base templates (virtual-desktop, virtual-server, desktop-hypervisor, live-desktop, live-server)
- add recipes_manifest.yaml: 16 recipe variants defined declaratively
- add Makefile: automation targets for generate, validate, test
- add requirements.txt: PyYAML dependency
- add tests/test_recipe_generator.py: 25 pytest tests

This enables:
- Template-based recipe generation with minimal duplication
- One-line variant addition via YAML manifest editing
- Automatic duplicate include prevention
- Ingredient path validation

Generated recipes are committed for reproducibility as per project conventions.
This commit is contained in:
Lukas Greve
2026-03-24 19:52:34 +01:00
parent c1c5fa8d07
commit 1aa264c146
40 changed files with 1601 additions and 124 deletions
+12 -13
View File
@@ -5,17 +5,16 @@
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
# Unsafe. Development-only. A recipe for a virtual desktop based on Fedora 43
# A recipe for a virtual desktop
%include ../ingredients/core.cfg # Text mode
%include ../ingredients/core-storage.cfg # ext4-based storage configuration
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language
%include ../ingredients/core-security-off.cfg # Enable root account, disable firewall and SELinux
%include ../ingredients/core-services.cfg # Required systemd services
%include ../ingredients/core-network.cfg # Network configuration
%include ../ingredients/core-packages.cfg # Mandatory packages
%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43
%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment
%include ../ingredients/core-initial-setup-server.cfg # Enable initial setup to allow end users to create user on first boot
%include ../ingredients/base-guest-agents.cfg # Guest agents
%include ../ingredients/core.cfg
%include ../ingredients/core-storage.cfg
%include ../ingredients/core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg
%include ../ingredients/core-services.cfg
%include ../ingredients/core-network.cfg
%include ../ingredients/core-packages.cfg
%include ../ingredients/core-initial-setup-server.cfg
%include ../ingredients/core-security-off.cfg
%include ../ingredients/base-desktop-gnome.cfg
%include ../ingredients/base-guest-agents.cfg