AtlasOfLivingAustralia / ala-install

Ansible playbooks for installing the ALA components
https://www.ala.org.au
Apache License 2.0
26 stars 52 forks source link

Missing docker module errors in some computers #700

Open vjrj opened 1 year ago

vjrj commented 1 year ago

@matthewandrews and before @djtfmartin reported about issues with docker related modules.

ERROR! couldn't resolve module/action 'docker_stack'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in 'ala-install/ansible/roles/docker-common/tasks/stack-create.yml': line 12, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Remove Docker Swarm stack
  ^ here

This is commented for instance here.

I did not install anything extra in any machine where I tested this PR or where I'm using it. This is why I'm thinking that probably it can be a python related issue that only affects to Macs computers.

Reading ansible issues, I found this ansible member reply curiously to an old teammate:

image

That suggests that the use of ansible in Macs is not a bed of roses and he also gives some suggestions.

The idea with the Docker Swarm PR #683 was to not affect the current uses of ala-install but this seems it's not true. Sorry!

The current situation is that with #691 the problem is mitigated 1) but the problem is still there if you try to use the docker deployment in Macs and 2) also this change affects tasks in the includes that cannot be selected by tags.

This is why I propose to:

Any thoughts?

matthewandrews commented 1 year ago

That sounds like a sensible approach to me, thanks.

joe-lipson commented 1 year ago

I think this sums up the state of Python on local machines especially Macs https://xkcd.com/1987/ :D That seems reasonable to get things running. I'd propose we update our Ansible core to the latest version as a first step. I realise this may be easier said than done. Ideally there would be no local builds or configs, individual environments are too diverse and it's impossible to have them all in a consistent state anyway. A push to a repo can trigger a build/deploy from somewhere central

vjrj commented 1 year ago

I didn't know that xkcd :-D

For now I'll change only the vm-tasks using import, because, I also prefer to update ansible.

vjrj commented 4 months ago

I updated ansible in #800 . It's tested using u18 and u20 and both ansible versions.