ansible/docs/docsite/rst/reference_appendices/interpreter_discovery.rst
Alicia Cozine 43e0aa5b57
WIP: Backport/2.10/71588 (#71626)
* Add dual index pages for roadmaps (part of #71566)

(cherry picked from commit b518a5db14)

* Docsite: replace Latin phrases to English (#71588)

Replace Latin phrases like "e.g." and "i.e." and "etc." with English phrases.

* Update docs/docsite/rst/community/committer_guidelines.rst
* Update docs/docsite/rst/dev_guide/developing_modules_documenting.rst
* Update docs/docsite/rst/dev_guide/developing_program_flow_modules.rst
* Update docs/docsite/rst/dev_guide/module_lifecycle.rst
* Update docs/docsite/rst/user_guide/intro_inventory.rst
* Update docs/docsite/rst/user_guide/playbooks_loops.rst
* Update docs/docsite/rst/user_guide/playbooks_reuse.rst
* Update docs/docsite/rst/dev_guide/platforms/aws_guidelines.rst
* Update docs/docsite/rst/dev_guide/testing.rst
* Update docs/docsite/rst/dev_guide/testing_integration.rst
* Update docs/docsite/rst/porting_guides/porting_guide_2.5.rst
* Update docs/docsite/rst/reference_appendices/faq.rst

(cherry picked from commit 7bfeed3e24)

* fix index page and TOCs

* adds old roadmap index

* adds toctree ref for old roadmaps

Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
2020-09-04 14:44:13 -05:00

51 lines
2.5 KiB
ReStructuredText

.. _interpreter_discovery:
Interpreter Discovery
=====================
Most Ansible modules that execute under a POSIX environment require a Python
interpreter on the target host. Unless configured otherwise, Ansible will
attempt to discover a suitable Python interpreter on each target host
the first time a Python module is executed for that host.
To control the discovery behavior:
* for individual hosts and groups, use the ``ansible_python_interpreter`` inventory variable
* globally, use the ``interpreter_python`` key in the ``[defaults]`` section of ``ansible.cfg``
Use one of the following values:
auto_legacy : (default in 2.8)
Detects the target OS platform, distribution, and version, then consults a
table listing the correct Python interpreter and path for each
platform/distribution/version. If an entry is found, and ``/usr/bin/python`` is absent, uses the discovered interpreter (and path). If an entry
is found, and ``/usr/bin/python`` is present, uses ``/usr/bin/python``
and issues a warning.
This exception provides temporary compatibility with previous versions of
Ansible that always defaulted to ``/usr/bin/python``, so if you have
installed Python and other dependencies at ``/usr/bin/python`` on some hosts,
Ansible will find and use them with this setting.
If no entry is found, or the listed Python is not present on the
target host, searches a list of common Python interpreter
paths and uses the first one found; also issues a warning that future
installation of another Python interpreter could alter the one chosen.
auto : (future default in 2.12)
Detects the target OS platform, distribution, and version, then consults a
table listing the correct Python interpreter and path for each
platform/distribution/version. If an entry is found, uses the discovered
interpreter.
If no entry is found, or the listed Python is not present on the
target host, searches a list of common Python interpreter
paths and uses the first one found; also issues a warning that future
installation of another Python interpreter could alter the one chosen.
auto_legacy_silent
Same as ``auto_legacy``, but does not issue warnings.
auto_silent
Same as ``auto``, but does not issue warnings.
You can still set ``ansible_python_interpreter`` to a specific path at any
variable level (for example, in host_vars, in vars files, in playbooks, and so on).
Setting a specific path completely disables automatic interpreter discovery; Ansible always uses the path specified.