Skip to content

Create Variables Template Infrastructure #105

Closed

Description

@josecelano

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.tera with system configuration variables
  • Context Layer: Implement AnsibleVariablesContext with validation
  • Wrapper Layer: Implement AnsibleVariablesTemplate for rendering
  • Renderer Layer: Implement VariablesTemplateRenderer for 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.tera exists with SSH port variable
  • Template has correct Tera syntax: {{ ssh_port }}
  • YAML linting passes

Implementation

  • AnsibleVariablesContext with SSH port validation
  • AnsibleVariablesTemplate wrapper implementation
  • VariablesTemplateRenderer orchestrator
  • 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.yml generated in build directory

Documentation

  • Rustdoc comments for all public types
  • Template file includes descriptive comments
  • Error types have clear descriptions

Related

Activity

  1. added 8 commits that reference this issue on Nov 3, 2025
  2. added 2 commits that reference this issue on Nov 3, 2025
  3. added 2 commits that reference this issue on Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions