Skip to content

Commit 832661f

Browse files
committed
simplify make_started function in case a container is running, container definition has not changed and restart is not true
Signed-off-by: Valentin Heidelberger <[email protected]>
1 parent f8e391a commit 832661f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

plugins/module_utils/podman/podman_container_lib.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,13 +1812,8 @@ def make_started(self):
18121812
self.container.name)
18131813
self.update_container_result()
18141814
return
1815-
elif self.container.running and not self.container.different:
1816-
if self.restart:
1817-
self.container.restart()
1818-
self.results['actions'].append('restarted %s' %
1819-
self.container.name)
1820-
self.update_container_result()
1821-
return
1815+
elif self.container.running and not self.container.different \
1816+
and not self.restart:
18221817
self.update_container_result(changed=False)
18231818
return
18241819
elif not self.container.exists:

0 commit comments

Comments
 (0)