containers.podman.podman_pod_info – Gather info about podman pods

Note

This plugin is part of the containers.podman collection (version 1.9.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_pod_info.

New in version 1.0.0: of containers.podman

Synopsis

  • Gather info about podman pods with podman inspect command.

Requirements

The below requirements are needed on the host that executes this module.

  • Podman installed on host

Parameters

Parameter

Comments

executable

string

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

Default: “podman”

name

string

Name of the pod

Examples

- name: Gather info about all present pods
  containers.podman.podman_pod_info:

- name: Gather info about specific pods
  containers.podman.podman_pod_info:
    name: special_pod

Return Values

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

Key

Description

pods

list / elements=string

Facts from all or specified pods

Returned: always

Sample: [{“Config”: {“cgroupParent”: “/libpod_parent”, “created”: “2020-07-13T20:29:12.572282186+03:00”, “hostname”: “pod1host”, “id”: “d9cb6dbb0….”, “infraConfig”: {“infraPortBindings”: [{“containerPort”: 7111, “hostIP”: “”, “hostPort”: 7777, “protocol”: “tcp”}], “makeInfraContainer”: true}, “labels”: {}, “lockID”: 682, “name”: “pod1”, “sharesCgroup”: true, “sharesIpc”: true, “sharesNet”: true, “sharesUts”: true}, “Containers”: [{“id”: “ad46737bf….”, “state”: “configured”}], “State”: {“cgroupPath”: “/libpod_parent/d9cb6dbb0….”, “infraContainerID”: “ad46737bf….”, “status”: “Created”}}]

Authors

  • Sagi Shnaidman (@sshnaidm)