containers.podman.podman_search 模块 – 使用 podman 搜索远程镜像
注意
此模块是 containers.podman 集合 (版本 1.16.2) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install containers.podman
。
要在剧本中使用它,请指定: containers.podman.podman_search
。
概要
使用
podman
搜索远程镜像
参数
参数 |
注释 |
---|---|
如果 默认值: |
|
限制从搜索返回的镜像结果数量(每个镜像注册表) 默认值: |
|
是否返回与每个镜像关联的标签列表 选项
|
|
要查找的搜索词。除非在搜索词中定义了注册表,否则将搜索所有默认注册表。 |
注释
注意
Podman 可能需要提升的权限才能正常运行。
示例
- name: Search for any rhel images
containers.podman.podman_search:
term: "rhel"
limit: 3
- name: Gather info on a specific remote image
containers.podman.podman_search:
term: "myimageregistry.com/ansible-automation-platform/ee-minimal-rhel8"
- name: Gather tag info on a known remote image
containers.podman.podman_search:
term: "myimageregistry.com/ansible-automation-platform/ee-minimal-rhel8"
list_tags: True
返回值
常见的返回值已在此处记录,以下是此模块独有的字段
键 |
描述 |
---|---|
来自所有或指定镜像的信息 返回:始终 示例: |