Allow healthcheck override without test option (#847)

* Add healthcheck test_cli_compatible option

* Update plugins/module_utils/util.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/docker_container.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
x4rd0o1Vtx
2024-05-15 18:45:01 +02:00
committed by GitHub
parent 2eb2c9febf
commit 5016a96eba
5 changed files with 17 additions and 4 deletions
+10
View File
@@ -379,6 +379,16 @@ options:
- Command to run to check health.
- Must be either a string or a list. If it is a list, the first item must be one of V(NONE), V(CMD) or V(CMD-SHELL).
type: raw
test_cli_compatible:
description:
- If set to V(true), omitting O(healthcheck.test) while providing O(healthcheck) does not disable healthchecks,
but simply overwrites the image's values by the ones specified in O(healthcheck). This is
the behavior used by the Docker CLI.
- If set to V(false), omitting O(healthcheck.test) will disable the container's health check.
This is the classical behavior of the module and currently the default behavior.
default: false
type: bool
version_added: 3.10.0
interval:
description:
- Time between running the check.