Closed tehsmyers closed 4 years ago
Every option begins with "fix the broken import", so I'm going to put a PR up for that real quick and reference this issue.
At the moment, I think option 2 is the best balance of maintainability and user-friendliness, but look forward to seeing other potential ways to deal with this.
Thanks for this comprehensive report! I knew we'd have to start paying this tax for the close internal importing and coupling to Ansible core at some point. What you've outlined here is a good picture of what we're facing.
I'm up for 2 for the short term and we've already seen a need and basically, a decision, to try this path over in https://github.com/ansible/molecule/pull/2047#discussion_r285072742. It may be the most obvious one for now which is covered by our CI and keeps us moving.
3 is tempting but may add more maintenance overhead. I'm just brain storming here but is there any value in thinking about some pre-generation cookiecutter logic which decides which modules are used based on what ansible --version
returns? We could maintain a mapping of which modules to use somewhere based on versions and use the same templates ... this is quite meta but a POC might be useful.
As the original implementor in https://github.com/ansible/molecule/pull/1736, any chance we could summon your efforts once again on this one @bmildren? We could use the help :)
One further question: how does it work with setuptools when you want to skip the dopy dependency based on the version of Ansible? I assume we'll need to leave this extra for < 2.8? We'll just document that this requires now no external dependency or!?
Sorry folks I was away last week, I'd be happy to take a look 👍
Hello, guys.
Is there any news on this matter?
Sorry for hijacking this thread, but it's out of "despair". I've been trying to use Molecule and Ansible 2.8.x with DO ... And it ended very sad. Python 3.5 usually dies somewhere at parsing JSON from DO API. We moved to Python 3.6, but there we faced another roadblock - unresolved issues within "dead" dopy package. In the same time Linode driver is also marked as deprecated. Hetzner driver still in some early alpha stages. So, it's 3 out of 3 for small cloud providers - all of them are unusable with Molecule for now.
One more time sorry for offtopic, but I'm really hope to at least get an understading on how far this matter from working state. I found some PR and some following merges, but I still can't find a working recipe "Molecule+Ansible+DO".
PS: Sure, there are still "big" clouds (AWS/GCP/Azure), but they also little pricey in compare with little players.
Nice feedback @n0guest. We're working on it. It's going slow but at least it is going. Not many hands on deck here and the moving train that is Ansible is hard to keep up with since there are many issues in Molecule that slow things down.
Hopefully someone can pick this issue up soon.
Nice feedback @n0guest. We're working on it. It's going slow but at least it is going. Not many hands on deck here and the moving train that is Ansible is hard to keep up with since there are many issues in Molecule that slow things down.
Is there anyway how I could help? But, please note, that I'm not a python developer. So, in some other ways maybe?
While a lot of things are just plain 'ol Ansible, the core of Molecule and the drivers do require some working Python development knowledge. It's not bad but well, it's not easy either ;) If you get started, we can help! Otherwise, we'll be sure to call on you when we need some Q&A testing for this new driver migration!
Otherwise, we'll be sure to call on you when we need some Q&A testing for this new driver migration!
We're interested in working drivers for DO/Linode/Hetzner (needed for internal testing). So, we'd be happy to participate any way we can.
PS: But, I guess, this is a huge offtopic for this issue. And we should continue somewhere else?
We're interested in working drivers for DO/Linode/Hetzner
All of these are already working in some fashion btw. Hetzner just has no functional test suite but I use it. Linode is officially deprecated but there is no end of the support announced. This DO module is still in use. We're on #ansible-molecule @ freenode on IRC.
Hey people, we're moving our way to Molecule 3.0 and that means, we have a window for breaking changes. It would be nice to support the DO old modules here in molecule and the new ones but that is quite some work and we're low on capacity. If anyone has spare cycles, it'd be great to move to the new DO module ASAP.
Bump @bmildren @seandst :shark: :shark: :shark:
Apologies, I lost track of this one - I'll take a look this week
Driver moved to https://github.com/ansible-community/molecule-digitalocean/
Issue Type
Summary
Deprecations to the
digital_ocean
module in by ansible 2.8 have broken an import in functional tests and potentially change what dependencies are required based on the version of ansible being used.Background
digital_ocean
module: https://docs.ansible.com/ansible/2.8/modules/digital_ocean_module.html#deprecateddigital_ocean_droplet
module no longer requires thedopy
module to be installed to interact with digitalocean.digital_ocean
python module was renamed to_digital_ocean
, which breaks the existing import that molecule currently uses to determine if digitalocean support is available: https://github.com/ansible/molecule/blob/86d98ed594029441327c7282208a098ed185076c/test/functional/conftest.py#L356-L362Molecule should, of course, stop using the deprecated module in favor of the new module added in ansible 2.8. Doing so introduces some complexity, which is that molecule will now need to inspect the ansible version to conditionally decide which module to use, both in playbooks that use the digitalocean modules, and in the
supports_digitalocean
function above. There are a few different ways that molecule can deal with this complexity, which I've tried to outline here.Options
digital_ocean
module, which will be removed in ansible 2.12 (so we'll be able to safely transition during the ansible 2.10 and 2.11 releases. This is a simple option, but is not very user-friendly since it requires ansible 2.8 users to install a dependency to use digitialocean that is no longer required in ansible 2.8.dopy
module for ansible >= 2.8. It will result in more complicated create.yml and destroy.yml playbooks for digitalocean scenarios.