mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-03-22 02:29:08 +00:00
Recreate stopped containers if recreate flag is enabled (#669)
If `recreate` flag is enabled we should be able to (force) recreate stopped containers even if they're configuration isn't changed. Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
This commit is contained in:
parent
6c87654f7f
commit
b693cb6b89
2 changed files with 22 additions and 1 deletions
|
|
@ -1659,7 +1659,8 @@ class PodmanManager:
|
|||
self.results['actions'].append('started %s' % self.container.name)
|
||||
self.update_container_result()
|
||||
return
|
||||
elif self.container.stopped and self.container.different:
|
||||
elif self.container.stopped and \
|
||||
(self.container.different or self.recreate):
|
||||
self.container.recreate_run()
|
||||
self.results['actions'].append('recreated %s' %
|
||||
self.container.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue