ansible in Fedora 23+ (python3)

Ryan S. Brown ryansb at
Thu Oct 15 19:36:28 UTC 2015

On 10/15/2015 03:30 PM, Lars Kellogg-Stedman wrote:
> On Thu, Oct 15, 2015 at 11:54:29AM -0400, Bill Nottingham wrote:
>> same python version as the Ansible version you're using.  If Ansible were to
>> use python3, all module bindings would need to be python 3, and *all the
>> managed machines would need to have python3 installed*.
> Isn't it entirely possible -- through liberal use of 'six' and 'from
> future...' -- to write code that will operate correctly with both
> Python 2 and Python 3?  I thought that, e.g., OpenStack was pursuing
> exactly that strategy.
> Sure, you still need your target Python 3 environment to have the
> appropriate supporting modules, but that seems like a different issue.
> Environments runnning Python 2 should continue to Just Work.

[not an ansible dev, but I am an OpenStack contributor]

The difference here is the span of versions that need to be supported. 
OpenStack is only trying to support 2.7-3.X and the gulf between 2.4 and 
2.7 is actually quite broad. It is likely possible, but it will be a 
very large amount of work and would add dependencies to both runtimes.

Because "no setup" is such a huge part of what makes ansible attractive, 
I doubt adding that dependency would be viable.

Ryan Brown / Senior Software Engineer, OpenStack / Red Hat, Inc.

More information about the devel mailing list