community.general.lxd connection – Run tasks in LXD instances using lxc CLI
Note
This connection plugin is part of the community.general collection (version 10.7.3).
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
lxcCLI.
Parameters
Parameter | Comments |
|---|---|
executable string | Shell to use for execution inside instance. Default: Configuration:
|
lxd_become_method string added in community.general 10.4.0 | Become command used to switch to a non-root user. Is only used when Default: Configuration:
|
project string added in community.general 2.0.0 | Name of the LXD project to use. Configuration:
|
remote string added in community.general 2.0.0 | Name of the LXD remote to use. Default: Configuration:
|
remote_addr string | 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:
|
remote_user string added in community.general 10.4.0 | User to login/authenticate as. Can be set from the CLI via 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).
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/lxd_connection.html