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

docker_compose_v2 doesn't allow compose files to be named compose.yaml or compose.yml #756

Closed
sebdanielsson opened this issue Jan 14, 2024 · 2 comments · Fixed by #759
Closed
Labels
bug Something isn't working docker-compose-v2 Docker Compose v2

Comments

@sebdanielsson
Copy link

SUMMARY

The new docker_compose_v2 doesn't allow Docker compose files to be named compose.yaml or compose.yml

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.docker.docker_compose_v2

ANSIBLE VERSION
ansible [core 2.16.1]
  config file = None
  configured module search path = ['/Users/sebastian/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/9.1.0/libexec/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/sebastian/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.12.1 (main, Dec  7 2023, 20:45:44) [Clang 15.0.0 (clang-1500.0.40.1)] (/opt/homebrew/Cellar/ansible/9.1.0/libexec/bin/python)
  jinja version = 3.1.3
  libyaml = True
COLLECTION VERSION
# /Users/sebastian/.ansible/collections/ansible_collections
Collection       Version
---------------- --------
community.docker 3.6.0-b2

# /opt/homebrew/Cellar/ansible/9.1.0/libexec/lib/python3.12/site-packages/ansible_collections
Collection       Version
---------------- --------
community.docker 3.4.11
CONFIGURATION
CONFIG_FILE() = None
OS / ENVIRONMENT

Target: Proxmox PVE 8.1.3

STEPS TO REPRODUCE

Create a compose.yaml or compose.yml file for a Docker compose project. For example Watchtower.

Try to start it with:

- name: Deploy Watchtower
  community.docker.docker_compose_v2:
    project_src: /docker/watchtower
    pull: always
    state: present
EXPECTED RESULTS

Watchtower should start.

ACTUAL RESULTS
fatal: [hogsmeade]: FAILED! => {"changed": false, "msg": "\"/docker/watchtower\" does not contain docker-compose.yml or docker-compose.yaml"}
@felixfontein felixfontein added bug Something isn't working docker-compose-v2 Docker Compose v2 labels Jan 15, 2024
@felixfontein
Copy link
Collaborator

Ref: https://docs.docker.com/compose/compose-yaml-file/

Interesting, I wasn't aware that compose.yaml / compose.yml is possible and even preferred.

@felixfontein
Copy link
Collaborator

#759 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker-compose-v2 Docker Compose v2
Projects
None yet
2 participants