mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-03-22 02:29:08 +00:00
Fix podman collection for Podman version 4 (#398)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
parent
4a7d64bb43
commit
aa4c3223d2
3 changed files with 12 additions and 5 deletions
|
|
@ -104,7 +104,7 @@ ARGUMENTS_SPEC_CONTAINER = dict(
|
||||||
publish=dict(type='list', elements='str', aliases=[
|
publish=dict(type='list', elements='str', aliases=[
|
||||||
'ports', 'published', 'published_ports']),
|
'ports', 'published', 'published_ports']),
|
||||||
publish_all=dict(type='bool'),
|
publish_all=dict(type='bool'),
|
||||||
read_only=dict(type='bool', default=False),
|
read_only=dict(type='bool'),
|
||||||
read_only_tmpfs=dict(type='bool'),
|
read_only_tmpfs=dict(type='bool'),
|
||||||
recreate=dict(type='bool', default=False),
|
recreate=dict(type='bool', default=False),
|
||||||
requires=dict(type='list', elements='str'),
|
requires=dict(type='list', elements='str'),
|
||||||
|
|
@ -655,6 +655,7 @@ class PodmanDefaults:
|
||||||
"oom_score_adj": 0,
|
"oom_score_adj": 0,
|
||||||
"pid": "",
|
"pid": "",
|
||||||
"privileged": False,
|
"privileged": False,
|
||||||
|
"read_only": False,
|
||||||
"rm": False,
|
"rm": False,
|
||||||
"security_opt": [],
|
"security_opt": [],
|
||||||
"stop_signal": self.image_info['config'].get('stopsignal', "15"),
|
"stop_signal": self.image_info['config'].get('stopsignal', "15"),
|
||||||
|
|
@ -966,11 +967,19 @@ class PodmanContainerDiff:
|
||||||
return self._diff_update_and_compare('log_driver', before, after)
|
return self._diff_update_and_compare('log_driver', before, after)
|
||||||
|
|
||||||
def diffparam_log_level(self):
|
def diffparam_log_level(self):
|
||||||
excom = self.info.get('exitcommand', [])
|
if 'exitcommand' in self.info:
|
||||||
|
excom = self.info.get('exitcommand', [])
|
||||||
|
elif 'createcommand' in self.info['config']:
|
||||||
|
excom = self.info['config'].get('createcommand', [])
|
||||||
|
else:
|
||||||
|
self._diff_update_and_compare('log_level', '', '')
|
||||||
if '--log-level' in excom:
|
if '--log-level' in excom:
|
||||||
before = excom[excom.index('--log-level') + 1].lower()
|
before = excom[excom.index('--log-level') + 1].lower()
|
||||||
else:
|
else:
|
||||||
before = self.params['log_level']
|
if self.module.params['log_level'] is not None:
|
||||||
|
before = ''
|
||||||
|
else:
|
||||||
|
before = self.params['log_level']
|
||||||
after = self.params['log_level']
|
after = self.params['log_level']
|
||||||
return self._diff_update_and_compare('log_level', before, after)
|
return self._diff_update_and_compare('log_level', before, after)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -637,7 +637,6 @@ options:
|
||||||
description:
|
description:
|
||||||
- Mount the container's root filesystem as read only. Default is false
|
- Mount the container's root filesystem as read only. Default is false
|
||||||
type: bool
|
type: bool
|
||||||
default: False
|
|
||||||
read_only_tmpfs:
|
read_only_tmpfs:
|
||||||
description:
|
description:
|
||||||
- If container is running in --read-only mode, then mount a read-write
|
- If container is running in --read-only mode, then mount a read-write
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,6 @@
|
||||||
- rmi4 is not changed
|
- rmi4 is not changed
|
||||||
- rmi5 is changed
|
- rmi5 is changed
|
||||||
- "'alpine-sh' not in images.stdout"
|
- "'alpine-sh' not in images.stdout"
|
||||||
- "'library/alpine' not in images.stdout"
|
|
||||||
|
|
||||||
- name: Pull a specific version of an image
|
- name: Pull a specific version of an image
|
||||||
containers.podman.podman_image:
|
containers.podman.podman_image:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue