Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use docker_compose in 2.1.0 #267

Closed
EricAtORS opened this issue Jan 4, 2022 · 7 comments · Fixed by #269
Closed

Cannot use docker_compose in 2.1.0 #267

EricAtORS opened this issue Jan 4, 2022 · 7 comments · Fixed by #269
Labels
bug Something isn't working

Comments

@EricAtORS
Copy link

SUMMARY

docker_compose fails in 2.1.0

ISSUE TYPE
  • Bug Report
COMPONENT NAME
- name: start registry
  community.docker.docker_compose:
    project_src: "{{ docker_compose_storage_path }}/registry/"
ANSIBLE VERSION
ansible 2.9.6
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/eric/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Jun  2 2021, 10:49:15) [GCC 9.4.0]
COLLECTION VERSION
$ ansible-galaxy collection list community.docker
usage: ansible-galaxy collection [-h] COLLECTION_ACTION ...
ansible-galaxy collection: error: argument COLLECTION_ACTION: invalid choice: 'list' (choose from 'init', 'build', 'publish', 'install')
CONFIGURATION
# no output
OS / ENVIRONMENT

Ubuntu 20.04 on WSL. Pretty much vanilla

STEPS TO REPRODUCE

Run ansible-galaxy collection install community.docker:2.1.0

- name: start registry
  community.docker.docker_compose:
    project_src: "/docker/registry/"

Right now, down grading to community.docker == 2.0.2 works.

EXPECTED RESULTS

For it to start my docker-compose stack.

ACTUAL RESULTS
TASK [docker-registry : start registry] ********************************************************************************fatal: [internal]: FAILED! => {"msg": "Could not find imported module support code for version.  Looked for either LooseVersion.py or version.py"}      
@felixfontein
Copy link
Collaborator

Please note that Ansible 2.9.6 is really old and has a lot of security issues and bugs that have been fixed in later 2.9.x releases.

In any case, this seems to be a problem with Ansible 2.9.x that was fixed in Ansible 2.9.20; 2.9.19 still produces the same error message.

@felixfontein
Copy link
Collaborator

This is probably related to ansible/ansible@f8caa43 (2.9.20); it was also backported to ansible-base 2.10 in ansible/ansible@5185255, which appeared in ansible-base 2.10.8.

@EricAtORS
Copy link
Author

@felixfontein
Thanks for pointing it out.
2.9.6 is the default version inside of the ubuntu 20.04 repositories.

I'll look in to how I can upgrade it to a more recent version.

@dericcrago
Copy link

hi @EricAtORS - you could try using the PPA for a more recent version - https://launchpad.net/~ansible/+archive/ubuntu/ansible

@felixfontein
Copy link
Collaborator

resolved_by_pr #269

@felixfontein
Copy link
Collaborator

I plan to create new releases once #269 has been merged. With these releases, the issue should be fixed.

@felixfontein
Copy link
Collaborator

community.docker 1.10.4 and 2.1.1 have been released which fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants