community.general.lxd connection – Run tasks in LXD instances using lxc
CLI
Note
This connection plugin is part of the community.general collection (version 11.2.1).
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 community.general
.
To use it in a playbook, specify: community.general.lxd
.
Synopsis
Run commands or put/fetch files to an existing instance using
lxc
CLI.
Parameters
Parameter |
Comments |
---|---|
Shell to use for execution inside instance. Default: Configuration:
|
|
Become command used to switch to a non-root user. Is only used when Default: Configuration:
|
|
Name of the LXD project to use. Configuration:
|
|
Name of the LXD remote to use. Default: Configuration:
|
|
Instance (container/VM) identifier. Since community.general 8.0.0, a FQDN can be provided; in that case, the first component (the part before Default: Configuration:
|
|
User to login/authenticate as. Can be set from the CLI with the Default: Configuration:
|
Note
Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. The entry types are also ordered by precedence from low to high priority order. For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list).