mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Exorcise Python-2.6
This commit is contained in:
parent
a3385a60b4
commit
c4951cce0b
6 changed files with 31 additions and 9 deletions
6
changelogs/fragments/drop-python-2.6-controller.yaml
Normal file
6
changelogs/fragments/drop-python-2.6-controller.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
major_changes:
|
||||
- Support for running an Ansible controller with Python 2.6 has been dropped.
|
||||
You can still manage machines which use Python-2.6 but you will have to
|
||||
manage them from a machine which has Python-2.7 or Python-3.5 or greater
|
||||
installed.
|
|
@ -30,13 +30,15 @@ controller-side section.
|
|||
Minimum Version of Python-3.x and Python-2.x
|
||||
--------------------------------------------
|
||||
|
||||
In both controller side and module code, we support Python-3.5 or greater and Python-2.6 or
|
||||
greater. Python-3.5 was chosen as a minimum because it is the earliest Python-3 version
|
||||
adopted as the default Python by a Long Term Support (LTS) Linux distribution (in this case, Ubuntu-16.04).
|
||||
Previous LTS Linux distributions shipped with a Python-2 version which users can rely upon instead of the
|
||||
Python-3 version.
|
||||
On the controller we support Python-3.5 or greater and Python-2.7 or greater. Module-side, we
|
||||
support Python-3.5 or greater and Python-2.6 or greater.
|
||||
|
||||
For Python-2, the default is for modules to run on at least Python-2.6. This allows
|
||||
Python-3.5 was chosen as a minimum because it is the earliest Python-3 version adopted as the
|
||||
default Python by a Long Term Support (LTS) Linux distribution (in this case, Ubuntu-16.04).
|
||||
Previous LTS Linux distributions shipped with a Python-2 version which users can rely upon instead
|
||||
of the Python-3 version.
|
||||
|
||||
For Python 2, the default is for modules to run on at least Python-2.6. This allows
|
||||
users with older distributions that are stuck on Python-2.6 to manage their
|
||||
machines. Modules are allowed to drop support for Python-2.6 when one of
|
||||
their dependent libraries requires a higher version of Python. This is not an
|
||||
|
|
|
@ -531,6 +531,12 @@ A helpful development approach to this should be to ensure that all of the tests
|
|||
run under Python 2.6 and that each assertion in the test cases has been checked to work by breaking
|
||||
the code in Ansible to trigger that failure.
|
||||
|
||||
.. warn:: Maintain Python-2.6 compatibility
|
||||
|
||||
Please remember that modules need to maintain compatibility with Python-2.6 so the unittests for
|
||||
modules should also be compatible with Python-2.6.
|
||||
|
||||
|
||||
.. seealso::
|
||||
|
||||
:doc:`testing_units`
|
||||
|
|
|
@ -41,7 +41,7 @@ information about running from source. It's not necessary to install the progra
|
|||
Control Machine Requirements
|
||||
````````````````````````````
|
||||
|
||||
Currently Ansible can be run from any machine with Python 2 (versions 2.6 or 2.7) or Python 3 (versions 3.5 and higher) installed (Windows isn't supported for the control machine).
|
||||
Currently Ansible can be run from any machine with Python 2 (version 2.7) or Python 3 (versions 3.5 and higher) installed (Windows isn't supported for the control machine).
|
||||
|
||||
This includes Red Hat, Debian, CentOS, macOS, any of the BSDs, and so on.
|
||||
|
||||
|
|
|
@ -14,6 +14,14 @@ This document is part of a collection on porting. The complete list of porting g
|
|||
|
||||
.. contents:: Topics
|
||||
|
||||
Python Compatibility
|
||||
====================
|
||||
|
||||
Ansible has dropped compatibility with Python-2.6 on the controller (The host where :command:`/usr/bin/ansible`
|
||||
or :command:`/usr/bin/ansible-playbook` is run). Modules shipped with Ansible can still be used to
|
||||
manage hosts which only have Python-2.6. You just need to have a host with Python-2.7 or Python-3.5
|
||||
or greater to manage those hosts from.
|
||||
|
||||
Playbook
|
||||
========
|
||||
|
||||
|
|
|
@ -685,8 +685,8 @@ would an IPv4 address or hostname::
|
|||
|
||||
|
||||
.. Note:: The ipaddress library is only included by default in Python 3.x. To
|
||||
use IPv6 addresses in Python 2.6 and 2.7, make sure to run
|
||||
``pip install ipaddress`` which installs a backported package.
|
||||
use IPv6 addresses in Python 2.7, make sure to run ``pip install ipaddress`` which installs
|
||||
a backported package.
|
||||
|
||||
HTTPS Certificate Validation
|
||||
````````````````````````````
|
||||
|
|
Loading…
Reference in a new issue