-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Parent Epic: #19 - Refactor Ansible Templates to Variables Pattern
Overview
Create the centralized variables.yml.tera template and supporting Rust infrastructure (context, wrapper, renderer) to consolidate Ansible playbook variables into a single file. This establishes the foundation for the variables pattern that will simplify future playbook additions.
Goals
- Variables Template: Create
templates/ansible/variables.yml.terawith system configuration variables - Context Layer: Implement
AnsibleVariablesContextwith validation - Wrapper Layer: Implement
AnsibleVariablesTemplatefor rendering - Renderer Layer: Implement
VariablesTemplateRendererfor orchestration - Integration: Hook into
AnsibleTemplateRenderer::render()workflow - Test Coverage: Comprehensive unit tests for all components
🏗️ Architecture Requirements
DDD Layer: Infrastructure
Module Path: src/infrastructure/external_tools/ansible/template/
Pattern: Template Wrapper + Context + Renderer (existing pattern)
Time Estimate
2.5 days - Complete vertical slice including implementation, testing, and documentation
Documentation
Full implementation details: docs/issues/19.1-create-variables-template.md
Acceptance Criteria
Template File
-
templates/ansible/variables.yml.teraexists with SSH port variable - Template has correct Tera syntax:
{{ ssh_port }} - YAML linting passes
Implementation
-
AnsibleVariablesContextwith SSH port validation -
AnsibleVariablesTemplatewrapper implementation -
VariablesTemplateRendererorchestrator - Integration into
AnsibleTemplateRenderer
Testing
- Unit tests pass:
cargo test - Config tests pass:
cargo run --bin e2e-config-tests - Linters pass:
cargo run --bin linter all -
variables.ymlgenerated in build directory
Documentation
- Rustdoc comments for all public types
- Template file includes descriptive comments
- Error types have clear descriptions
Related
- Parent Epic: EPIC: Refactor Ansible Templates to Variables Pattern #19
- Next Task: EPIC: Refactor Ansible Templates to Variables Pattern #19.2 (depends on this task)
- Template System Architecture
Copilot
Metadata
Metadata
Assignees
Labels
No labels