Skip to content

Commit 02282b8

Browse files
HarmtHs-hertel
andauthored
Update interpreter_discovery for changes made in ansible-core 2.17 (#2438)
* Update interpreter_discovery for changes made in ansible-core 2.17 * Mention the list searched * Minor wording improvement * Remove unnecessary note * Revert realignment * Remove trailing space * Apply suggestions from code review Co-authored-by: Sloane Hertel <[email protected]> --------- Co-authored-by: Sloane Hertel <[email protected]>
1 parent a2067ce commit 02282b8

File tree

1 file changed

+12
-32
lines changed

1 file changed

+12
-32
lines changed

docs/docsite/rst/reference_appendices/interpreter_discovery.rst

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,19 @@ To control the discovery behavior:
1313
* for individual hosts and groups, use the ``ansible_python_interpreter`` inventory variable
1414
* globally, use the ``interpreter_python`` key in the ``[defaults]`` section of ``ansible.cfg``
1515

16-
Use one of the following values:
16+
Configure a path to a specific Python interpreter, or one of the following values:
17+
18+
auto (default) :
19+
Searches the configurable list of common Python interpreter paths
20+
(see :ref:`INTERPRETER_PYTHON_FALLBACK`) and issues a warning that
21+
future installation of another Python interpreter could alter the one chosen.
1722

1823
auto_legacy :
19-
Detects the target OS platform, distribution, and version, then consults a
20-
table listing the correct Python interpreter and path for each
21-
platform/distribution/version. If an entry is found, and ``/usr/bin/python`` is absent, uses the discovered interpreter (and path). If an entry
22-
is found, and ``/usr/bin/python`` is present, uses ``/usr/bin/python``
23-
and issues a warning.
24-
This exception provides temporary compatibility with previous versions of
25-
Ansible that always defaulted to ``/usr/bin/python``, so if you have
26-
installed Python and other dependencies at ``/usr/bin/python`` on some hosts,
27-
Ansible will find and use them with this setting.
28-
If no entry is found, or the listed Python is not present on the
29-
target host, searches a list of common Python interpreter
30-
paths and uses the first one found; also issues a warning that future
31-
installation of another Python interpreter could alter the one chosen.
32-
33-
auto : (default in 2.12)
34-
Detects the target OS platform, distribution, and version, then consults a
35-
table listing the correct Python interpreter and path for each
36-
platform/distribution/version. If an entry is found, uses the discovered
37-
interpreter.
38-
If no entry is found, or the listed Python is not present on the
39-
target host, searches a list of common Python interpreter
40-
paths and uses the first one found; also issues a warning that future
41-
installation of another Python interpreter could alter the one chosen.
42-
43-
auto_legacy_silent
44-
Same as ``auto_legacy``, but does not issue warnings.
45-
46-
auto_silent
24+
Deprecated alias for ``auto``.
25+
26+
auto_silent :
4727
Same as ``auto``, but does not issue warnings.
4828

49-
You can still set ``ansible_python_interpreter`` to a specific path at any
50-
variable level (for example, in host_vars, in vars files, in playbooks, and so on).
51-
Setting a specific path completely disables automatic interpreter discovery; Ansible always uses the path specified.
29+
auto_legacy_silent :
30+
Deprecated alias for ``auto_silent``.
31+

0 commit comments

Comments
 (0)