containers.podman.podman_search module – Search for remote images using podman

Note

This module is part of the containers.podman collection (version 1.16.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install containers.podman.

To use it in a playbook, specify: containers.podman.podman_search.

Synopsis

  • Search for remote images using podman

Parameters

Parameter

Comments

executable

string

Path to podman executable if it is not in the $PATH on the machine running podman

Default: "podman"

limit

integer

Limit the number of image results returned from the search (per image registry)

Default: 25

list_tags

boolean

Whether or not to return the list of tags associated with each image

Choices:

  • false ← (default)

  • true

term

string / required

The search term to look for. Will search all default registries unless a registry is defined in the search term.

Notes

Note

  • Podman may required elevated privileges in order to run properly.

Examples

- 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

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

images

list / elements=string

info from all or specified images

Returned: always

Sample: [{"Automated": "", "Description": "Red Hat Enterprise Linux Atomic Image is a minimal, fully supported base image.", "Index": "registry.access.redhat.com", "Name": "registry.access.redhat.com/rhel7-atomic", "Official": "", "Stars": 0, "Tags": ["1.0", "1.1", "1.1.1-devel"]}]

Authors

  • Derek Waters (@derekwaters)