Skip to main content
The LXD modules manage LXD containers.

Functions

lxd.container

Add/remove LXD containers.
lxd.container(
    id,
    present=True,
    image="ubuntu:16.04",
)
This operation does not check if an existing container is based on the specified image.

Examples

from pyinfra.operations import lxd

# Add an ubuntu container
lxd.container(
    name="Add an ubuntu container",
    id="ubuntu19",
    image="ubuntu:19.10",
)

Build docs developers (and LLMs) love