mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 04:36:40 +00:00
The meshed round was its own shape: a mesh-only first pass, one application deploy, and a second only when a drill needed one. Comparing it with the direct arm meant adjusting for a missing pass and a stripped browser suite, and every timing answer carried a caveat. Both arms now run deploy, converge, drill, redeploy, converge, verify. What the mesh needs moves into a prologue that installs no role: tunnel up on every node, keys rotated, controller joined, transport switched. Both application passes then run over the tunnel and both print their PASS banner, so a meshed row and a direct row differ only in how they were reached. The credential reset stays in the prologue rather than moving to the direct arm's slot between the passes. Its mirror copies the manager's host_vars over every other host, keeping only applications.svc-net-wireguard, so after the switch every worker would inherit the manager's mesh address and three connections would land on one node. The drill probe now gates both arms. A backup host deployed for an application with no NFS-flagged volume is several minutes spent on a drill that skips itself, and that was true on the direct arm before this branch existed.
Shared Utilities (utils/)
This directory contains shared Python helpers used by custom modules and plugins.
Purpose
Use utils/ for reusable code that should not be duplicated across:
library/modules,plugins/action/,plugins/filter/,plugins/lookup/.
Typical shared utilities:
- API clients,
- validation/conversion helpers,
- path and configuration helpers,
- cross-plugin/module domain logic.
- Shared HTTP(S) connection handler for multiple modules.
- Common validation or transformation functions for user input.
- Utility functions for interacting with Docker, LDAP, etc.
- Grouped helper packages such as
utils/domains/for related domain logic.
Design Guidelines
- Keep helpers focused and composable.
- Avoid side effects during import.
- Prefer explicit function/class APIs over implicit globals.
- Keep dependencies minimal so modules/plugins stay lightweight.
Example Import
from utils.domains.primary_domain import get_primary_domain
What Does Not Belong Here
- Standalone executable modules (put in
library/). - Ansible plugin entrypoints (put in
plugins/*).
References
- Module utilities: https://docs.ansible.com/ansible/latest/dev_guide/developing_module_utilities.html
- Plugin development: https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html