# LXD inventory from a different host

**URL:** <https://forum.ansible.com/t/lxd-inventory-from-a-different-host/35591>\
**Category:** Ansible Project\
**Created:** [August 5, 2021, 5:37pm UTC](https://forum.ansible.com/t/lxd-inventory-from-a-different-host/35591 "2021-08-05T17:37:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Hodgson](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@David\_Hodgson](https://forum.ansible.com/u/David_Hodgson)\
**Post date:** [August 5, 2021, 5:37pm UTC](https://forum.ansible.com/t/lxd-inventory-from-a-different-host/35591/1 "2021-08-05T17:37:22Z")

</div>

Hi

I have ansible on one host, and a cluster of LXD hosts, accessible via ssh. I think I’m missing something, but how do I tell the [LXD inventory module](https://docs.ansible.com/ansible/devel/collections/community/general/lxd_inventory.html) to:

1. run on (one of) the LXD hosts
2. return inventory entries that will proxy the ansible commands for the LXD containers via the LXD host.

Thanks  
David

---

<div class="post-metadata">

**Author:** ![David\_Hodgson](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@David\_Hodgson](https://forum.ansible.com/u/David_Hodgson)\
**Post date:** [August 6, 2021, 9:23am UTC](https://forum.ansible.com/t/lxd-inventory-from-a-different-host/35591/2 "2021-08-06T09:23:16Z")

</div>

OK, apologies. The second question is about variables for each LXD container. This would require that each container (or the whole LXD inventory) had a variable which identified the LXD host through which it’s accessible - either the host from which the inventory was analysed or the cluster host on which the container is running.

David
