mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Fix docker container restart
restart_containers(containers.running) may try to restart containers that are deleted when looping through get_differing_containers() fix this by refreshing list after first loop
This commit is contained in:
committed by
Matt Clay
parent
6b4fbe62de
commit
762bd3a801
@@ -1782,6 +1782,8 @@ def restarted(manager, containers, count, name):
|
|||||||
manager.stop_containers([container])
|
manager.stop_containers([container])
|
||||||
manager.remove_containers([container])
|
manager.remove_containers([container])
|
||||||
|
|
||||||
|
containers.refresh()
|
||||||
|
|
||||||
manager.restart_containers(containers.running)
|
manager.restart_containers(containers.running)
|
||||||
started(manager, containers, count, name)
|
started(manager, containers, count, name)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user