ahembree / ansible-hms-docker

Ansible playbook for automated home media server setup
GNU General Public License v3.0
391 stars 47 forks source link

Couldn't resolve module/action community.docker.docker_compose_v2 #70

Open TiiFuchs opened 1 month ago

TiiFuchs commented 1 month ago

I just pulled the latest changes to be up to date but running make check or make apply I get the following error:

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

The error appears to be in '/hms/ansible-hms-docker/roles/hmsdocker/tasks/main.yml': line 108, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Ensure containers defined in compose file.
  ^ here
make: *** [Makefile:44: check] Fehler 4
ahembree commented 1 month ago

This was resolved in this issue: https://github.com/ahembree/ansible-hms-docker/issues/63

TLDR:

  1. Uninstall current Ansible install (sudo apt remove ansible)
  2. Install/update ansible using pip (sudo pip3 install -U ansible)
  3. Verify correct versions are installed using ansible --version and ansible-galaxy collection list | grep docker
  4. should be running ansible [core 2.16.6] with community.docker version 3.9.0

The root cause of this issue was an ansible update that broke the compose deployment, so an update was needed to switch to the newer compose module