summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/cloud/docker/docker_container.py
diff options
context:
space:
mode:
authorFelix Fontein <felix@fontein.de>2020-02-03 19:13:17 +0100
committerGitHub <noreply@github.com>2020-02-03 13:13:17 -0500
commit5c1a3a3ac2086119bd16316dde379047d90cd86c (patch)
treee4e89484171b645f7e5a1e046b9d294a55a5df49 /lib/ansible/modules/cloud/docker/docker_container.py
parentd6f2b4e788ed13756ba4e4a05b8b7a879900dbc3 (diff)
downloadansible-5c1a3a3ac2086119bd16316dde379047d90cd86c.tar.gz
docker_container and docker_swarm_service: allow to actually disable healthcheck of image (#66599)
* Allow to actually disable healthcheck of image. * Add changelog.
Diffstat (limited to 'lib/ansible/modules/cloud/docker/docker_container.py')
-rw-r--r--lib/ansible/modules/cloud/docker/docker_container.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ansible/modules/cloud/docker/docker_container.py b/lib/ansible/modules/cloud/docker/docker_container.py
index 24856e8aa5..2c8c7df85d 100644
--- a/lib/ansible/modules/cloud/docker/docker_container.py
+++ b/lib/ansible/modules/cloud/docker/docker_container.py
@@ -1480,6 +1480,10 @@ class TaskParameters(DockerBaseClass):
if self.client.option_minimal_versions[value]['supported']:
result[key] = getattr(self, value)
+ if self.disable_healthcheck:
+ # Make sure image's health check is overridden
+ result['healthcheck'] = {'test': ['NONE']}
+
if self.networks_cli_compatible and self.networks:
network = self.networks[0]
params = dict()