mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Fix quadlet parameters for restart policy
Fix #797 Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
parent
d25cf57967
commit
c6486fba01
2 changed files with 7 additions and 1 deletions
|
|
@ -477,6 +477,7 @@ class PodmanModuleParams:
|
|||
self.check_version('--env-host', minv='1.5.0')
|
||||
return c + ['--env-host=%s' % self.params['env_host']]
|
||||
|
||||
# Exception for etc_hosts and add-host
|
||||
def addparam_etc_hosts(self, c):
|
||||
for host_ip in self.params['etc_hosts'].items():
|
||||
c += ['--add-host', ':'.join(host_ip)]
|
||||
|
|
@ -510,6 +511,7 @@ class PodmanModuleParams:
|
|||
def addparam_group_entry(self, c):
|
||||
return c + ['--group-entry', self.params['group_entry']]
|
||||
|
||||
# Exception for healthcheck and healthcheck-command
|
||||
def addparam_healthcheck(self, c):
|
||||
return c + ['--healthcheck-command', self.params['healthcheck']]
|
||||
|
||||
|
|
@ -644,6 +646,7 @@ class PodmanModuleParams:
|
|||
return c
|
||||
return c + ['--network', ",".join(self.params['network'])]
|
||||
|
||||
# Exception for network_aliases and network-alias
|
||||
def addparam_network_aliases(self, c):
|
||||
for alias in self.params['network_aliases']:
|
||||
c += ['--network-alias', alias]
|
||||
|
|
@ -729,6 +732,7 @@ class PodmanModuleParams:
|
|||
def addparam_requires(self, c):
|
||||
return c + ['--requires', ",".join(self.params['requires'])]
|
||||
|
||||
# Exception for restart_policy and restart
|
||||
def addparam_restart_policy(self, c):
|
||||
return c + ['--restart=%s' % self.params['restart_policy']]
|
||||
|
||||
|
|
@ -757,6 +761,7 @@ class PodmanModuleParams:
|
|||
def addparam_seccomp_policy(self, c):
|
||||
return c + ['--seccomp-policy', self.params['seccomp_policy']]
|
||||
|
||||
# Exception for secrets and secret
|
||||
def addparam_secrets(self, c):
|
||||
for secret in self.params['secrets']:
|
||||
c += ['--secret', secret]
|
||||
|
|
@ -801,6 +806,7 @@ class PodmanModuleParams:
|
|||
def addparam_timeout(self, c):
|
||||
return c + ['--timeout', self.params['timeout']]
|
||||
|
||||
# Exception for timezone and tz
|
||||
def addparam_timezone(self, c):
|
||||
return c + ['--tz=%s' % self.params['timezone']]
|
||||
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ class ContainerQuadlet(Quadlet):
|
|||
if params["requires"]:
|
||||
params["podman_args"].append(f"--requires {','.join(params['requires'])}")
|
||||
if params["restart_policy"]:
|
||||
params["podman_args"].append(f"--restart-policy {params['restart_policy']}")
|
||||
params["podman_args"].append(f"--restart {params['restart_policy']}")
|
||||
if params["retry"]:
|
||||
params["podman_args"].append(f"--retry {params['retry']}")
|
||||
if params["retry_delay"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue