containers.podman.podman_import – Import Podman container from a tar file.
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_import
.
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 |
Comments |
---|---|
Set changes as list of key-value pairs, see example. |
|
Set commit message for imported image |
|
Path to Default: “podman” |
|
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 |
Description |
---|---|
info from loaded image Returned: always 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”: null, “ManifestType”: “application/vnd.oci.image.manifest.v1+json”, “NamesHistory”: null, “Os”: “linux”, “Parent”: “”, “RepoDigests”: [], “RepoTags”: [], “RootFS”: {“Layers”: [“sha256:….”], “Type”: “layers”}, “Size”: 5882449, “User”: “”, “Version”: “”, “VirtualSize”: 5882449} |
Authors
Sagi Shnaidman (@sshnaidm)