mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix #16211 - only stop/kill running containers
This commit is contained in:
@@ -1616,7 +1616,8 @@ class ContainerManager(DockerBaseClass):
|
||||
self.diff['image_different'] = True
|
||||
self.log("differences")
|
||||
self.log(differences, pretty_print=True)
|
||||
self.container_stop(container.Id)
|
||||
if container.running:
|
||||
self.container_stop(container.Id)
|
||||
self.container_remove(container.Id)
|
||||
new_container = self.container_create(self.parameters.image, self.parameters.create_parameters)
|
||||
if new_container:
|
||||
|
||||
Reference in New Issue
Block a user