containers.podman.podman_quadlet_build module – Build images for use by Podman Quadlets
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.
To use it in a playbook, specify: containers.podman.podman_quadlet_build.
Synopsis
Build images using Quadlet.
Parameters
Parameter |
Comments |
|---|---|
Dictionary of key=value pairs to add to the image. Only works with OCI images. Ignored for Docker containers. |
|
CPU architecture for the container image |
|
Path to file containing authorization credentials to the remote registry. |
|
Dictionary of key=value pairs to add as build argument. |
|
Path to directory containing TLS certificates and keys to use. |
|
Whether or not to use cached layers when building an image Choices:
|
|
Extra global arguments to pass to the These are placed after the executable and before the subcommand. |
|
Set custom DNS servers in the /etc/resolv.conf file that will be shared between all containers in the pod. A special option, “none” is allowed which disables creation of /etc/resolv.conf for the pod. |
|
Set custom DNS options in the /etc/resolv.conf file that will be shared between all containers in the pod. |
|
Set custom DNS search domains in the /etc/resolv.conf file that will be shared between all containers in the pod. |
|
Dictionary of key=value pairs to add as environment variable. |
|
Path to Default: |
|
Path to the Containerfile if it is not in the build context directory. |
|
Always remove intermediate containers after a build, even if the build is unsuccessful. Choices:
|
|
Add additional groups to run as |
|
Path to an alternate .containerignore file to use when building the image. |
|
Labels to set on the image. |
|
Name of the image to build. It may contain a tag using the format |
|
List of the names of CNI networks the build should join during the RUN instructions. |
|
Password to use when authenticating to remote registries. |
|
Pull image policy. The default is ‘missing’. Choices:
|
|
Path to the directory to write quadlet file in. By default, it will be set as |
|
The permissions of the quadlet file. The If If Specifying |
|
Name of quadlet file to write. By default it takes image name without prefixes and tags. |
|
Options for the quadlet file. Provide missing in usual build args options as a list of lines to add. |
|
Number of times to retry pulling or pushing images between the registry and local storage in case of failure. Default is 3. |
|
Duration of delay between retry attempts when pulling or pushing images between the registry and local storage in case of failure. |
|
Pass secret information used in Containerfile build stages in a safe way. Generally has the form |
|
Provide context (a working directory) to podman build. |
|
Specify the target build stage to build. |
|
username to use when authenticating to remote registries. |
|
Require HTTPS and validate certificates when pulling or pushing. Also used during build if a pull or push is necessary. Choices:
|
|
Override the default architecture variant of the container image to be built. |
|
Specify multiple volume / mount options to mount one or more mounts to a container. |
Examples
- name: Build an image
containers.podman.podman_quadlet_build:
name: myimage
file: /tmp/Containerfile
- name: Build an image
containers.podman.podman_quadlet_build:
name: myimage
set_working_directory: /tmp/context
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether any change was made Returned: always |