Interview Prep/Ansible/Fundamentals and Architecture

How do Ansible and Python versions interact between the controller and the targets?

IntermediateConceptFundamentals and Architecture
Answer

The controller and the targets have separate Python requirements. The controller needs a recent Python (3.11+ for current ansible-core). The targets need a Python version that the installed ansible-core still supports for modules; each core release drops the oldest target versions.

So a very old target (for example CentOS 7 with Python 2.7 or 3.6) pins you to an older ansible-core, or forces you to install a newer Python on the target and set ansible_python_interpreter. Always check the support matrix when upgrading core.

All Ansible questions Roadmap: Ansible

More on Fundamentals and Architecture