containers.podman.podman_quadlet_info module – Gather information about Podman Quadlets

Note

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

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_quadlet_info.

Synopsis

  • List installed Podman Quadlets or print one quadlet content using podman quadlet list/print.

  • Gather information about Podman Quadlets available on the system.

Parameters

Parameter

Comments

cmd_args

list / elements=string

Extra global arguments to pass to the podman command (e.g., --log-level=debug).

These are placed after the executable and before the subcommand.

debug

boolean

Return additional debug information.

Choices:

  • false ← (default)

  • true

executable

string

Path to the podman executable.

Default: "podman"

kinds

list / elements=string

List of quadlet kinds to filter by (based on file suffix).

For example, container matches quadlets ending with .container.

Choices:

  • "container"

  • "pod"

  • "network"

  • "volume"

  • "kube"

  • "image"

name

string

Name of the quadlet to print content for.

When specified, runs podman quadlet print instead of list.

quadlet_dir

path

Filter results to quadlets whose path is under this directory.

By default no filtering is applied.

Examples

- name: List all quadlets
  containers.podman.podman_quadlet_info:

- name: Get information about a specific quadlet
  containers.podman.podman_quadlet_info:
    name: myapp.container

- name: List only container quadlets
  containers.podman.podman_quadlet_info:
    kinds:
      - container

- name: List quadlets in a custom directory
  containers.podman.podman_quadlet_info:
    quadlet_dir: /etc/containers/systemd

Return Values

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

Key

Description

changed

boolean

Always false

Returned: always

content

string

Content of the quadlet when name is provided

Returned: when name is provided

quadlets

list / elements=string

List of installed quadlets when listing

Returned: when name is not provided

stderr

string

podman stderr

Returned: when debug=true

stdout

string

podman stdout

Returned: when debug=true

Authors

  • Sagi Shnaidman (@sshnaidm)