Manage LXD containers.
New in version 2019.2.0.
| maintainer: | René Jochum <rene@jochums.at> |
|---|---|
| maturity: | new |
| depends: | python-pylxd |
| platform: | Linux |
salt.states.lxd_container.absent(name, stop=False, remote_addr=None, cert=None, key=None, verify_cert=True)¶Ensure a LXD container is not present, destroying it if present
An URL to a remote Server, you also have to give cert and key if you provide remote_addr!
PEM Formatted SSL Zertifikate.
PEM Formatted SSL Key.
salt.states.lxd_container.frozen(name, start=True, remote_addr=None, cert=None, key=None, verify_cert=True)¶Ensure a LXD container is frozen, start and freeze it if start is true
An URL to a remote Server, you also have to give cert and key if you provide remote_addr!
PEM Formatted SSL Zertifikate.
PEM Formatted SSL Key.
salt.states.lxd_container.migrated(name, remote_addr, cert, key, verify_cert, src_remote_addr, stop_and_start=False, src_cert=None, src_key=None, src_verify_cert=None)¶Ensure a container is migrated to another host
If the container is running, it either must be shut down first (use stop_and_start=True) or criu must be installed on the source and destination machines.
For this operation both certs need to be authenticated,
use lxd.authenticate <salt.states.lxd.authenticate
to authenticate your cert(s).
An URL to the destination remote Server
PEM Formatted SSL Zertifikate.
PEM Formatted SSL Key.
An URL to the source remote Server
PEM Formatted SSL Zertifikate, if None we copy "cert"
PEM Formatted SSL Key, if None we copy "key"
salt.states.lxd_container.present(name, running=None, source=None, profiles=None, config=None, devices=None, architecture='x86_64', ephemeral=False, restart_on_change=False, remote_addr=None, cert=None, key=None, verify_cert=True)¶Create the named container if it does not exist
True, ensure that the container is runningFalse, ensure that the container is stoppedNone, do nothing with regards to the running state of the
containerCan be either a string containing an image alias:
"xenial/amd64"
or an dict with type "image" with alias:
{"type": "image",
"alias": "xenial/amd64"}
or image with "fingerprint":
{"type": "image",
"fingerprint": "SHA-256"}
or image with "properties":
{"type": "image",
"properties": {
"os": "ubuntu",
"release": "14.04",
"architecture": "x86_64"
}}
or none:
{"type": "none"}
or copy:
{"type": "copy",
"source": "my-old-container"}
A config dict or None (None = unset).
Can also be a list:
[{'key': 'boot.autostart', 'value': 1},
{'key': 'security.privileged', 'value': '1'}]
Can be one of the following:
An URL to a remote Server, you also have to give cert and key if you provide remote_addr!
PEM Formatted SSL Zertifikate.
PEM Formatted SSL Key.
salt.states.lxd_container.running(name, restart=False, remote_addr=None, cert=None, key=None, verify_cert=True)¶Ensure a LXD container is running and restart it if restart is True
An URL to a remote Server, you also have to give cert and key if you provide remote_addr!
PEM Formatted SSL Zertifikate.
PEM Formatted SSL Key.
salt.states.lxd_container.stopped(name, kill=False, remote_addr=None, cert=None, key=None, verify_cert=True)¶Ensure a LXD container is stopped, kill it if kill is true else stop it
An URL to a remote Server, you also have to give cert and key if you provide remote_addr!
PEM Formatted SSL Zertifikate.
PEM Formatted SSL Key.
Docs for previous releases are available on readthedocs.org.
Latest Salt release: 3004.1