mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-04-30 21:08:49 +00:00
Attempt graceful stop when recreating container (#203)
References: containers/ansible-podman-collections#202 Co-authored-by: Sergey <sshnaidm@users.noreply.github.com>
This commit is contained in:
parent
5b133ee898
commit
4da30fd3fd
1 changed files with 4 additions and 0 deletions
|
|
@ -1389,11 +1389,15 @@ class PodmanContainer:
|
|||
|
||||
def recreate(self):
|
||||
"""Recreate the container."""
|
||||
if self.running:
|
||||
self.stop()
|
||||
self.delete()
|
||||
self.create()
|
||||
|
||||
def recreate_run(self):
|
||||
"""Recreate and run the container."""
|
||||
if self.running:
|
||||
self.stop()
|
||||
self.delete()
|
||||
self.run()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue