mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-16 20:08:41 +00:00
Make sure that one of project_src and definition is provided. (#886)
This commit is contained in:
parent
a5b5681608
commit
4cac2ac021
2
changelogs/fragments/886-compose-v2-req.yml
Normal file
2
changelogs/fragments/886-compose-v2-req.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- "docker_compose_v2* modules - there was no check to make sure that one of ``project_src`` and ``definition`` is provided. The modules crashed if none were provided (https://github.com/ansible-collections/community.docker/issues/885, https://github.com/ansible-collections/community.docker/pull/886)."
|
||||||
@ -18,7 +18,7 @@ options:
|
|||||||
- Path to a directory containing a Compose file
|
- Path to a directory containing a Compose file
|
||||||
(C(compose.yml), C(compose.yaml), C(docker-compose.yml), or C(docker-compose.yaml)).
|
(C(compose.yml), C(compose.yaml), C(docker-compose.yml), or C(docker-compose.yaml)).
|
||||||
- If O(files) is provided, will look for these files in this directory instead.
|
- If O(files) is provided, will look for these files in this directory instead.
|
||||||
- Mutually exclusive with O(definition).
|
- Mutually exclusive with O(definition). One of O(project_src) and O(definition) must be provided.
|
||||||
type: path
|
type: path
|
||||||
project_name:
|
project_name:
|
||||||
description:
|
description:
|
||||||
@ -37,7 +37,7 @@ options:
|
|||||||
definition:
|
definition:
|
||||||
description:
|
description:
|
||||||
- Compose file describing one or more services, networks and volumes.
|
- Compose file describing one or more services, networks and volumes.
|
||||||
- Mutually exclusive with O(project_src) and O(files).
|
- Mutually exclusive with O(project_src) and O(files). One of O(project_src) and O(definition) must be provided.
|
||||||
- If provided, PyYAML must be available to this module, and O(project_name) must be specified.
|
- If provided, PyYAML must be available to this module, and O(project_name) must be specified.
|
||||||
- Note that a temporary directory will be created and deleted afterwards when using this option.
|
- Note that a temporary directory will be created and deleted afterwards when using this option.
|
||||||
type: dict
|
type: dict
|
||||||
|
|||||||
@ -518,6 +518,9 @@ def common_compose_argspec_ex():
|
|||||||
('definition', 'project_src'),
|
('definition', 'project_src'),
|
||||||
('definition', 'files')
|
('definition', 'files')
|
||||||
],
|
],
|
||||||
|
required_one_of=[
|
||||||
|
('definition', 'project_src'),
|
||||||
|
],
|
||||||
required_by={
|
required_by={
|
||||||
'definition': ('project_name', ),
|
'definition': ('project_name', ),
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user