ployground / ploy_ansible

Plugin to integrate Ansible with ploy.
5 stars 4 forks source link

Ansible 2.x support #18

Open koobs opened 8 years ago

koobs commented 8 years ago

Tracking issue to document the need for Ansible 2.x support. See:

FreeBSD Issue #213730: sysutils/ansible1: Remove deprecated port

fschulze commented 8 years ago

We will most likely need a ploy_ansible2 for this, because too many internals changed. For bsdploy we'd like to move away from ansible for license and usability reasons, but got no funding/time for it yet.

koobs commented 8 years ago

@fschulze Thanks for the quick update. Is it reasonable to assume that saltstack is the presumptive candidate alternative, given it's written in Python?

fschulze commented 8 years ago

@koobs it's definitely a good candidate. Another one is mgmt.

rene0 commented 7 years ago

From the FreeBSD side, is there any news on this ticket?

fschulze commented 7 years ago

No, I hope to get to it in march. Easiest is most likely ploy_ansible2. Everything else is too much work at the moment, unless I get funding for it.

ghost commented 6 years ago

Any specific issues you need help tackling to move up the timeline for getting ploy_ansible2 out? I'm currently finding myself doing this from scratch and it's not fun reinventing the wheel.

fschulze commented 6 years ago

@queerbsd I started here https://github.com/fschulze/ploy_ansible/tree/ansible2

What do you mean with "doing this from scratch"?

Ideal for me would be funding to implement it. Maybe someone can also take my branch further. One big thing is adding vault support back in. The remaining tasks is getting the old functionality back that I threw out in the branch to get going at all. The absolute basics are there now.

ghost commented 6 years ago

"from scratch" on my end means reimplementing a jail management configuration entirely in Ansible 2 without the benefit of ploy. But thanks for the tip, I'll see what I can do.

fschulze commented 6 years ago

So, https://github.com/ployground/ploy_ansible/tree/ansible2 is mostly done I think, but I haven't done extensive testing on complex setups yet. Also bsdploy may or may not work with it, the tests definitely fail atm, because of the ploy 2.x requirement. I spent 4 days on this now and can't look into the bsdploy tests atm.

fschulze commented 6 years ago

I'v released a beta: ploy_ansible 2.0.0b2, currently the ploy_crypted lookup plugin is most likely broken, didn't test it yet.

fschulze commented 6 years ago

Fixed ploy_crypted in 2.0.0b3. Last remaining thing to test is sudo support in playbooks.

fschulze commented 6 years ago

With 2.0.0b4 sudo (or rather the become stuff) works as well.

neirbowj commented 5 years ago

Could you give us an idea of what sort of "funding" would be required to drop ansible1 as a dependency?

fschulze commented 5 years ago

@neirbowj I'm a freelancer. So far ploy was funded mostly by projects where it's used in production and some of my spare time because I use it myself. Recently none of these projects had the need to go beyond Ansible 1.9.x considering the involved work. I also made the observation that Ansible 2.x is much slower than Ansible 1.9.x because the way SSH connections are made changed and my custom plugin included in ploy_ansible doesn't work with the new way Ansible 2.x handles that. The only alternative I know is mitogen, but it seems it's not well received in the Ansible community. I also haven't tried it myself yet and don't know if it would play together with ploy. So overall my interest in Ansible 2.x has waned. The current state of ploy_ansible in my development branch is that both 1.9.x and 2.4.x are almost working at the same time, but 2.4.x is slower and has at least one bug (filtering tasks by tag doesn't work). I guess there isn't much left, but I was very busy with other stuff the last months. I'm also fully booked until at least the end of march, probably also april as it looks at the moment. I'm pretty sure that I will finish the porting work at some point, since it's almost there, but I either need some spare time or someone paying for it in or after april. If someone wants to book me for it, contact me via email.

fschulze commented 5 years ago

Just remembered: by the end of the year it's very likely the switch is done, because the projects I work on are switching to Python 3 so they have to update and provide the funding for it. Just in case you are patient enough for that.

fschulze commented 5 years ago

ploy_ansible 2.0.0b5 now supports ansible 1.9.x and 2.4.x-2.7.x, 2.8.x broke several (internal) APIs

fschulze commented 5 years ago

With 2.x everything is still quite a bit slower than with 1.9.x because ansible uses multiprocessing and that breaks my ssh connection caching, so every task creates a new ssh connection. I looked into mitogen, but its ansible_mitogen plugin is pretty hacky to be able to do what it does and I wasn't yet able to make it work with ploy. I think it is possible by supplying the correct ssh variables for each instance though.