mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Merge branch 'add-podman_system_info-module' of github.com:johnsonlien/ansible-podman-collections into add-podman_system_info-module
This commit is contained in:
commit
66c0eadf39
7 changed files with 20 additions and 9 deletions
|
|
@ -5,6 +5,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import shlex
|
||||
|
||||
from ansible_collections.containers.podman.plugins.module_utils.podman.common import compare_systemd_file_content
|
||||
|
||||
|
|
@ -169,9 +170,9 @@ class ContainerQuadlet(Quadlet):
|
|||
if isinstance(params["command"], list)
|
||||
else params["command"])
|
||||
if params["label"]:
|
||||
params["label"] = ["%s=%s" % (k, v) for k, v in params["label"].items()]
|
||||
params["label"] = [shlex.quote("%s=%s" % (k, v)) for k, v in params["label"].items()]
|
||||
if params["env"]:
|
||||
params["env"] = ["%s=%s" % (k, v) for k, v in params["env"].items()]
|
||||
params["env"] = [shlex.quote("%s=%s" % (k, v)) for k, v in params["env"].items()]
|
||||
if params["rootfs"]:
|
||||
params["rootfs"] = params["image"]
|
||||
params["image"] = None
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[metadata]
|
||||
name = ansible-podman-collections.containers
|
||||
summary = Ansible collections for Podman
|
||||
description-file =
|
||||
description_file =
|
||||
README.md
|
||||
|
||||
author = Sagi Shnaidman (@sshnaidm)
|
||||
|
|
|
|||
|
|
@ -1293,9 +1293,11 @@
|
|||
BAR: foo
|
||||
TEST: 1
|
||||
BOOL: false
|
||||
WITH_SPACES: "a nice string"
|
||||
label:
|
||||
somelabel: labelvalue
|
||||
otheralbe: othervalue
|
||||
spacelabel: "a nice label"
|
||||
log_opt:
|
||||
max_size: 10mb
|
||||
path: /var/log/container/mycontainer.json
|
||||
|
|
@ -1347,9 +1349,11 @@
|
|||
- "Unmask=ALL"
|
||||
- "SecurityLabelFileType=usr_t"
|
||||
- "Environment=BOOL=False"
|
||||
- "Environment='WITH_SPACES=a nice string'"
|
||||
- "PublishPort=9001:8000"
|
||||
- "AddHost=host2:127.0.0.1"
|
||||
- "Label=somelabel=labelvalue"
|
||||
- "Label='spacelabel=a nice label'"
|
||||
- "WantedBy=default.target"
|
||||
- "GroupAdd=admin"
|
||||
- "GroupAdd=users"
|
||||
|
|
@ -1411,9 +1415,11 @@
|
|||
BAR: foo
|
||||
TEST: 1
|
||||
BOOL: false
|
||||
WITH_SPACES: "a nice string"
|
||||
label:
|
||||
somelabel: labelvalue
|
||||
otheralbe: othervalue
|
||||
spacelabel: "a nice label"
|
||||
log_opt:
|
||||
max_size: 10mb
|
||||
path: /var/log/container/mycontainer.json
|
||||
|
|
|
|||
|
|
@ -85,11 +85,11 @@
|
|||
assert:
|
||||
that:
|
||||
- "'containers' in existing_container"
|
||||
- existing_container.containers
|
||||
- existing_container.containers | length > 0
|
||||
# - "existing_container.containers == podman_inspect_result"
|
||||
# - all_containers.containers == existing_container.containers
|
||||
- "'containers' in mixed_existing_container"
|
||||
- mixed_existing_container.containers
|
||||
- mixed_existing_container.containers | length > 0
|
||||
# - existing_container.containers == mixed_existing_container.containers
|
||||
|
||||
always:
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@
|
|||
assert:
|
||||
that:
|
||||
- "'login' in non_existing_registry"
|
||||
- non_existing_registry.login
|
||||
- non_existing_registry.login is not none
|
||||
- non_existing_registry.login != {}
|
||||
- non_existing_registry.login | length > 0
|
||||
- "'registry' in non_existing_registry.login"
|
||||
- "'username' in non_existing_registry.login"
|
||||
- "'logged_in' in non_existing_registry.login"
|
||||
|
|
@ -57,7 +59,9 @@
|
|||
assert:
|
||||
that:
|
||||
- "'login' in non_existing_authfile"
|
||||
- non_existing_authfile.login
|
||||
- non_existing_authfile.login is not none
|
||||
- non_existing_authfile.login != {}
|
||||
- non_existing_authfile.login | length > 0
|
||||
- "'username' in non_existing_authfile.login"
|
||||
- "'logged_in' in non_existing_authfile.login"
|
||||
- "non_existing_authfile.login.username == ''"
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "'networks' in existing_network"
|
||||
- existing_network.networks
|
||||
- existing_network.networks | length > 0
|
||||
- "existing_network.networks == podman_inspect_result"
|
||||
always:
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
assert:
|
||||
that:
|
||||
- "'volumes' in existing_volume"
|
||||
- existing_volume.volumes
|
||||
- existing_volume.volumes | length > 0
|
||||
- "existing_volume.volumes == podman_inspect_result"
|
||||
always:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue