docker_compose_v2: use --yes when available instead of -y (#1060)

* Use --yes if available.

* Add smoke test.
This commit is contained in:
Felix Fontein
2025-03-21 22:05:10 +01:00
committed by GitHub
parent c13b891bc9
commit 635716c07b
3 changed files with 13 additions and 3 deletions
@@ -84,6 +84,13 @@
state: present
register: present_3
- name: Present with --yes
docker_compose_v2:
project_src: '{{ project_src }}'
state: present
assume_yes: true
when: docker_compose_version is version('2.32.0', '>=')
- assert:
that:
- present_1_check is changed