docker_container: add image_comparison parameter (#428)

* Add image_comparison parameter.

* Forgot version_added.
This commit is contained in:
Felix Fontein
2022-07-15 17:14:40 +02:00
committed by GitHub
parent 37c868e192
commit 5d0a036819
4 changed files with 67 additions and 7 deletions
+13
View File
@@ -404,6 +404,19 @@ options:
- Can also be an image ID. If this is the case, the image is assumed to be available locally.
The I(pull) option is ignored for this case.
type: str
image_comparison:
description:
- Determines which image to use for idempotency checks that depend on image parameters.
- The default, C(desired-image), will use the image that is provided to the module via the I(image) parameter.
- C(current-image) will use the image that the container is currently using, if the container exists. It
falls back to the image that is provided in case the container does not yet exist.
- This affects the I(env), I(env_file), I(exposed_ports), I(labels), and I(volumes) options.
type: str
choices:
- desired-image
- current-image
default: desired-image
version_added: 3.0.0
image_label_mismatch:
description:
- How to handle labels inherited from the image that are not set explicitly.