From 1faf8dd5c2619fa8474e30fa2fd8a0ee5d4f0a05 Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Wed, 26 Aug 2015 00:01:35 +0200 Subject: [PATCH] Docker module: restarted should update the container when necessary --- lib/ansible/modules/cloud/docker/docker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/modules/cloud/docker/docker.py b/lib/ansible/modules/cloud/docker/docker.py index 77dcdcae9ce..042988f6a7f 100644 --- a/lib/ansible/modules/cloud/docker/docker.py +++ b/lib/ansible/modules/cloud/docker/docker.py @@ -1643,6 +1643,10 @@ def restarted(manager, containers, count, name): containers.refresh() + for container in manager.get_differing_containers(): + manager.stop_containers([container]) + manager.remove_containers([container]) + manager.restart_containers(containers.running) started(manager, containers, count, name)