You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In FreeBSD, there is no guarantee that either ``/usr/local/bin/python`` executable file or a link to an executable file is installed by default. The best practice for a remote host, with respect to Ansible, is to install at least the Python version supported by Ansible, for example, ``lang/python38``, and both meta ports ``lang/python3`` and ``lang/python``. Quoting from */usr/ports/lang/python3/pkg-descr*:
65
+
In FreeBSD, there is no guarantee that either ``/usr/local/bin/python`` executable file or a link to an executable file is installed by default. The best practice for a remote host, with respect to Ansible, is to install at least the Python version supported by Ansible, for example, ``lang/python311``, and both meta ports ``lang/python3`` and ``lang/python``. Quoting from */usr/ports/lang/python3/pkg-descr*:
66
66
67
67
.. code-block:: text
68
68
@@ -83,31 +83,30 @@ As a result, the following packages are installed:
83
83
.. code-block:: text
84
84
85
85
shell> pkg info | grep python
86
-
python-3.8_3,2 "meta-port" for the default version of Python interpreter
87
-
python3-3_3 Meta-port for the Python interpreter 3.x
88
-
python38-3.8.12_1 Interpreted object-oriented programming language
86
+
python-3.11_3,2 "meta-port" for the default version of Python interpreter
87
+
python3-3_4 Meta-port for the Python interpreter 3.x
88
+
python311-3.11.10 Interpreted object-oriented programming language
-r-xr-xr-x 1 root wheel 4744 Oct 31 11:14 python3.11
100
+
-r-xr-xr-x 1 root wheel 3113 Oct 31 11:14 python3.11-config
102
101
103
102
INTERPRETER_PYTHON_FALLBACK
104
103
"""""""""""""""""""""""""""
105
104
106
-
Since version 2.8 Ansible provides a useful variable ``ansible_interpreter_python_fallback`` to specify a list of paths to search for Python. See :ref:`INTERPRETER_PYTHON_FALLBACK`. This list will be searched and the first item found will be used. For example, the configuration below would make the installation of the meta-ports in the previous section redundant, that is, if you don't install the Python meta ports the first two items in the list will be skipped and ``/usr/local/bin/python3.8`` will be discovered.
105
+
Since version 2.8 Ansible provides a useful variable ``ansible_interpreter_python_fallback`` to specify a list of paths to search for Python. See :ref:`INTERPRETER_PYTHON_FALLBACK`. This list will be searched and the first item found will be used. For example, the configuration below would make the installation of the meta-ports in the previous section redundant, that is, if you don't install the Python meta ports the first two items in the list will be skipped and ``/usr/local/bin/python3.11`` will be discovered.
You can use this variable, prolonged by the lower versions of Python, and put it, for example, into the ``group_vars/all``. Then, override it for specific groups in ``group_vars/{group1, group2, ...}`` and for specific hosts in ``host_vars/{host1, host2, ...}`` if needed. See :ref:`ansible_variable_precedence`.
@@ -132,7 +131,7 @@ For example, given the inventory
0 commit comments