Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pydantic for accessing Ansible facts #245

Open
ckunki opened this issue Mar 6, 2024 · 0 comments
Open

Use pydantic for accessing Ansible facts #245

ckunki opened this issue Mar 6, 2024 · 0 comments
Labels
refactoring Code improvement without behavior change

Comments

@ckunki
Copy link
Contributor

ckunki commented Mar 6, 2024

The AI-Lab build architecture uses Ansible facts set in general_setup_tasks.yml to define main configuration options in a single place and to pass these configurations to all related build steps.

When create_image.py runs Ansible, it also retrieves the facts afterward, and uses them to configure the Dockerfile and to parameterize its entry point in entrypoint.py.

Improvements and additions to the AI-Lab added more and more Ansible facts. File entrypoint.py and related tests already implemented some helper functions to handle Ansible facts more conveniently.

The current ticket therefore proposes to use pydantic to make it even easier to handle Ansible facts.

@ckunki ckunki added the refactoring Code improvement without behavior change label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code improvement without behavior change
Projects
None yet
Development

No branches or pull requests

1 participant