salt.states.lxd_image#
Manage LXD images.
New in version 2019.2.0.
- maintainer:
René Jochum <rene@jochums.at>
- maturity:
new
- depends:
python-pylxd
- platform:
Linux
- salt.states.lxd_image.absent(name, remote_addr=None, cert=None, key=None, verify_cert=True)#
- name :
An alias or fingerprint of the image to check and delete.
- remote_addr :
An URL to a remote Server, you also have to give cert and key if you provide remote_addr!
- Examples:
https://myserver.lan:8443 /var/lib/mysocket.sock
- cert :
PEM Formatted SSL Zertifikate.
- Examples:
~/.config/lxc/client.crt
- key :
PEM Formatted SSL Key.
- Examples:
~/.config/lxc/client.key
- verify_certTrue
Wherever to verify the cert, this is by default True but in the most cases you want to set it off as LXD normally uses self-signed certificates.
- salt.states.lxd_image.present(name, source, aliases=None, public=None, auto_update=None, remote_addr=None, cert=None, key=None, verify_cert=True)#
Ensure an image exists, copy it else from source
- name :
An alias of the image, this is used to check if the image exists and it will be added as alias to the image on copy/create.
- source :
Source dict.
For an LXD to LXD copy:
source: type: lxd name: ubuntu/xenial/amd64 # This can also be a fingerprint. remote_addr: https://images.linuxcontainers.org:8443 cert: ~/.config/lxd/client.crt key: ~/.config/lxd/client.key verify_cert: False
From file:
source: type: file filename: salt://lxd/files/busybox.tar.xz saltenv: base
From simplestreams:
source: type: simplestreams server: https://cloud-images.ubuntu.com/releases name: xenial/amd64
From an URL:
source: type: url url: https://dl.stgraber.org/lxd
- aliases :
List of aliases to append, can be empty.
- public :
- Make this image public available on this instance?
None on source_type LXD means copy source None on source_type file means False
- auto_update :
- Try to auto-update from the original source?
None on source_type LXD means copy source source_type file does not have auto-update.
- remote_addr :
An URL to a remote Server, you also have to give cert and key if you provide remote_addr!
- Examples:
https://myserver.lan:8443 /var/lib/mysocket.sock
- cert :
PEM Formatted SSL Zertifikate.
- Examples:
~/.config/lxc/client.crt
- key :
PEM Formatted SSL Key.
- Examples:
~/.config/lxc/client.key
- verify_certTrue
Wherever to verify the cert, this is by default True but in the most cases you want to set it off as LXD normally uses self-signed certificates.