# containers.podman.podman_pod_info module – Gather info about podman pods

Note

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

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`. You need further requirements to be able to use this module, see Requirements for details.

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

New in containers.podman 1.0.0

## 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: `[{"CgroupParent": "user.slice", "CgroupPath": "user.slice/user-1000.slice/user@1000.service/user.slice/....slice", "Containers": [{"Id": "37f960e6c8accc6b5b41945b1dcf03a28d3a366f7f37049748f18b21c44f577e", "Name": "a99a49b8fa77-infra", "State": "created"}], "CreateCgroup": true, "CreateCommand": ["podman", "pod", "create", "--name", "pod_name", "--infra=True", "--userns", "auto", "--security-opt", "seccomp=unconfined", "--security-opt", "apparmor=unconfined", "--hostname", "mypod", "--dns", "1.1.1.2", "--label", "key=cval", "--label", "otherkey=kddkdk", "--label", "somekey=someval", "--add-host", "google:5.5.5.5", "--volume", "/tmp/test//:/data2"], "CreateInfra": true, "Created": "2024-05-28T20:41:09.946926613+03:00", "ExitPolicy": "continue", "Hostname": "mypod", "Id": "a99a41b8fa77d8c7ff1c432a7a21bc0c2afd8c13b94a9d9b9b19b66ae97920c1", "InfraConfig": {"DNSOption": null, "DNSSearch": null, "DNSServer": ["1.1.1.2"], "HostAdd": ["google:5.5.5.5"], "HostNetwork": false, "NetworkOptions": null, "Networks": null, "NoManageHosts": false, "NoManageResolvConf": false, "PortBindings": {}, "StaticIP": "", "StaticMAC": "", "pid_ns": "private", "userns": "host", "uts_ns": "private"}, "InfraContainerID": "37f960e6c8accc6b5b41945b1dcf03a28d3a366f7f37049748f18b21c44f577e", "Labels": {"key": "cval", "otherkey": "kddkdk", "somekey": "someval"}, "LockNumber": 1, "Name": "pod_name", "NumContainers": 1, "SharedNamespaces": ["user", "uts", "ipc", "net"], "State": "Created", "mounts": [{"Destination": "/data2", "Driver": "", "Mode": "", "Options": ["nosuid", "nodev", "rbind"], "Propagation": "rprivate", "RW": true, "Source": "/tmp/test", "Type": "bind"}], "security_opt": ["seccomp=unconfined", "apparmor=unconfined"]}]`

### Authors

- Sagi Shnaidman (@sshnaidm)

### Collection links

- Issue Tracker
- Repository (Sources)