# list and update lxc containers with ansible?

**URL:** <https://forum.ansible.com/t/list-and-update-lxc-containers-with-ansible/35220>\
**Category:** Ansible Project\
**Created:** [May 24, 2021, 4:32pm UTC](https://forum.ansible.com/t/list-and-update-lxc-containers-with-ansible/35220 "2021-05-24T16:32:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert2](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@Robert2](https://forum.ansible.com/u/Robert2)\
**Post date:** [May 24, 2021, 4:32pm UTC](https://forum.ansible.com/t/list-and-update-lxc-containers-with-ansible/35220/1 "2021-05-24T16:32:16Z")

</div>

I see a lot of modules that will create, start, stop lxc containers, but none seem to be able to provide a solution to list containers on a host or update them. Has anyone found a module to do this other than using the command or shell module?

Thanks  
Robert

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 24, 2021, 4:49pm UTC](https://forum.ansible.com/t/list-and-update-lxc-containers-with-ansible/35220/2 "2021-05-24T16:49:46Z")

</div>

There are several inventory plugins and scripts that allow you to  
'list' the lxc containers. As for updating, you can look into the  
lxc/lxd connection plugins that allow most modules to operate inside  
the containers.

---

<div class="post-metadata">

**Author:** ![Robert2](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@Robert2](https://forum.ansible.com/u/Robert2)\
**Post date:** [May 24, 2021, 4:59pm UTC](https://forum.ansible.com/t/list-and-update-lxc-containers-with-ansible/35220/3 "2021-05-24T16:59:35Z")

</div>

Thanks Brian,

I was almost positive there was a solution, I just didn’t know what to look for.

Robert
