4 ms·
I love Ansible, and have been using it since it was a humble little git repo with a single author. Unfortunately it's probably the most important python packag
by djrobstep 10y ago
I love Ansible, and have been using it since it was a humble little git repo with a single author.
Unfortunately it's probably the most important python package that doesn't support Python 3, it would be cool to see it upgraded. Apparently the hold-up is supporting very old 2.x python versions because of RHEL.
- benhoyt 10y agoI think it actually makes sense for something like Ansible to use Python 2 because it's about controlling lots of remote machines on various Linux distros, and the idea is that it's agentless. If you suddenly have to install an "agent" (Python 3) on all the remote machines before you control them with Ansible, that wouldn't be great. On the other hand, Ansible itself could have a tiny bootstrap step which installs Python 3 on all the remote machines before it does any work. In our case, we use Ansible daily for deployments, but haven't actually written any custom Python modules -- it's all just straight Ansible YAML. So I'm guessing for a lot of use cases it doesn't really matter what language Ansible is written in.
- Aissen 10y agoOr, they could support both so that they can be an agent for distros that won't have python2 installed and only python3 (AFAIK they don't exist yet).
- rlpb 10y agoUbuntu Server no longer has Python 2 installed by default (though it's available if you want it). This is the case on 16.04.
- Aissen 10y agoAh, I thought I heard about that somewhere. I did tests on 16.04 recently with ansible, but python2 was here, so I guess the image I was using wasn't a vanilla ubuntu (from a VPS provider).
- renaudg 10y agoThe latest Ubuntu LTS 16.04 only has Python3 installed by default. For Ansible modules to run at all, you need to install Python 2 first (possibly using "pre_tasks" + a "raw:" command in your Ansible playbook)
- ausjke 10y agoif it's _truly_ agent-less why do they care about the python version on the target, I feel that python target code is the agent? I might be missing something. Tried it a while ago, interested in developing tower-like management software(light-weight) using javascript as Tower is a bit too pricey for small/mid-sized customers.
- acveilleux 10y agoIt can do truly agent-less using raw mode (which is basically raw SSH). That said a version of Python 2 can be relied upon to be available on almost all Linux box.
- ausjke 10y agoyes that's what I used as my target is a resource-restricted router that does not have space for any python, that's the only occasion you can call it agent-less, but most people are not using that mode.
- calvins 10y ago> if it's _truly_ agent-less why do they care about the python version on the target, I feel that python target code is the agent? "Agentless" means that it works by pushing to the machine and that there isn't an agent process already running on the target. It doesn't mean that there aren't any requirements on what needs to be installed on the target already.
- bcoca 10y agoSupport for python3 has been on the roadmap, sadly most of the installed base of servers out there uses 2.x and in many cases 2.4 (centos/rhel5). This is NOT a switch from py2 to py3 we are aiming to support BOTH at the same time, this is not a trivial task (specially with 2.4) and will probably take us several versions to implement.