design.md 1.5 KB

Context

The project previously added ansible_python_interpreter: auto in group_vars/all.yml to handle hosts where Python might not be at the default path. This works correctly — Ansible discovers the interpreter and uses it. However, auto mode logs a [WARNING] on every host about the discovered interpreter potentially changing in the future, cluttering playbook output.

Ansible provides two auto-discovery modes:

  • auto — discovers interpreter, logs a warning about future instability
  • auto_silent — identical discovery logic, suppresses the warning

Goals / Non-Goals

Goals:

  • Suppress the Python interpreter discovery warning on all hosts
  • Maintain automatic interpreter discovery behavior

Non-Goals:

  • Pinning to a specific Python path (would break portability across different OS versions)
  • Changing Python version or installation method

Decisions

Use auto_silent instead of a hardcoded path.

auto_silent preserves the same discovery logic as auto but suppresses the warning. The alternative — hardcoding /usr/bin/python3 or /usr/bin/python3.13 — would break when hosts run different Python versions or when Python is upgraded.

Risks / Trade-offs

[Silenced warnings may hide a real interpreter change] → Acceptable. The bootstrap play already ensures Python 3 is installed. If a second interpreter appears, Ansible's discovery order is deterministic and well-documented. The warning is informational, not actionable.