MODIFIED Requirements
Requirement: Python 3 is bootstrapped on all managed hosts before module execution
A pre-task play SHALL run before any other plays in site.yml that installs python3 on all hosts using the raw module. This play SHALL set gather_facts: false to avoid triggering the setup module. The install command SHALL be idempotent (safe to re-run on hosts where Python is already installed). The ansible_python_interpreter SHALL be set to auto_silent in group_vars/all.yml to enable automatic interpreter discovery without emitting warnings.
Scenario: Host without Python 3
- WHEN Ansible runs against a host that does not have Python 3 installed
- THEN the raw task installs
python3 via apt-get install -y python3
- THEN subsequent plays can use standard Ansible modules
Scenario: Host already has Python 3
- WHEN Ansible runs against a host that already has Python 3 installed
- THEN the raw task completes successfully without changing the system
- THEN subsequent plays run normally
Scenario: Interpreter discovery runs silently
- WHEN Ansible discovers the Python interpreter on any managed host
- THEN no
[WARNING] about interpreter discovery SHALL be emitted in playbook output