containers.podman.podman_save module – Saves podman image to tar file

Note

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

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

Synopsis

  • podman save saves an image to either docker-archive, oci-archive, oci-dir (directory with oci manifest type), or docker-dir (directory with v2s2 manifest type) on the local machine, default is docker-archive.

Requirements

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

  • Podman installed on host

Parameters

Parameter

Comments

compress

boolean

Compress tarball image layers when pushing to a directory using the ‘dir’ transport. (default is same compression type, compressed or uncompressed, as source)

Choices:

  • false

  • true

dest

aliases: path

string / required

Destination file to write image to.

executable

string

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

Default: "podman"

force

boolean

Force saving to file even if it exists.

Choices:

  • false

  • true ← (default)

format

string

Save image to docker-archive, oci-archive (see containers-transports(5)), oci-dir (oci transport), or docker-dir (dir transport with v2s2 manifest type).

Choices:

  • "docker-archive"

  • "oci-archive"

  • "oci-dir"

  • "docker-dir"

image

list / elements=string / required

Image to save.

multi_image_archive

boolean

Allow for creating archives with more than one image. Additional names will be interpreted as images instead of tags. Only supported for docker-archive.

Choices:

  • false

  • true

Examples

# What modules does for example
- containers.podman.podman_save:
    image: nginx
    dest: /tmp/file123.tar
- containers.podman.podman_save:
    image:
      - nginx
      - fedora
    dest: /tmp/file456.tar
    multi_image_archive: true

Authors

  • Sagi Shnaidman (@sshnaidm)