containers.podman.podman_import – Import Podman container from a tar file. — Python documentation

# containers.podman.podman_import – Import Podman container from a tar file.

Note

This plugin is part of the containers.podman collection (version 1.10.1).

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

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

- Synopsis

- Requirements

- Parameters

- Examples

- Return Values

## Synopsis

- podman import imports a tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) and saves it as a filesystem image.

## Requirements

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

- Podman installed on host

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
change list / elements=dictionary |  | Set changes as list of key-value pairs, see example.
commit_message string |  | Set commit message for imported image
executable string | Default: "podman" | Path to `podman` executable if it is not in the `$PATH` on the machine running `podman`
src string / required |  | Path to image file to load.

## Examples

    # What modules does for example
    - containers.podman.podman_import:
        src: /path/to/tar/file
        change:
          - "CMD": /bin/bash
          - "User": root
        commit_message: "Importing image"

## Return Values

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

Key | Returned | Description
--- | --- | ---
image dictionary | always | info from loaded image Sample: {'Annotations': {}, 'Architecture': 'amd64', 'Author': '', 'Comment': 'imported from tarball', 'Config': {}, 'Created': '2021-09-07T04:45:38.749977105+03:00', 'Digest': 'sha256:8730c75be86a718929a658db4663d487e562d66762....', 'GraphDriver': {'Data': {'UpperDir': '/home/...34/diff', 'WorkDir': '/home/.../work'}, 'Name': 'overlay'}, 'History': [{'comment': 'imported from tarball', 'created': '2021-09-07T04:45:38.749977105+03:00', 'created_by': '/bin/sh -c #(nop) ADD file:091... in /'}], 'Id': 'cbc6d73c4d232db6e8441df96af81855f62c74157b5db80a1d5...', 'Labels': None, 'ManifestType': 'application/vnd.oci.image.manifest.v1+json', 'NamesHistory': None, 'Os': 'linux', 'Parent': '', 'RepoDigests': [], 'RepoTags': [], 'RootFS': {'Layers': ['sha256:....'], 'Type': 'layers'}, 'Size': 5882449, 'User': '', 'Version': '', 'VirtualSize': 5882449}

### Authors

- Sagi Shnaidman (@sshnaidm)