# LXC containers management on remote host

**URL:** <https://forum.ansible.com/t/lxc-containers-management-on-remote-host/23587>\
**Category:** Ansible Developer\
**Created:** [January 29, 2017, 3:02pm UTC](https://forum.ansible.com/t/lxc-containers-management-on-remote-host/23587 "2017-01-29T15:02:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Szymanski](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@Thomas\_Szymanski](https://forum.ansible.com/u/Thomas_Szymanski)\
**Post date:** [January 29, 2017, 3:02pm UTC](https://forum.ansible.com/t/lxc-containers-management-on-remote-host/23587/1 "2017-01-29T15:02:29Z")

</div>

Hello developers,

I'm sad I can't use my favorites roles & playbooks to configure my LXC containers on a remote host as the lxc\_container module shows only "container\_command" to use shell commands.

Could we talk about a PR ([https://github.com/ansible/ansible/pull/9427](https://github.com/ansible/ansible/pull/9427)) that intended to add a connection backend to manage remote LXC containers but has been abandoned by its author. There were some hesitations at this time about the merge of a feature that basically adds connection chaining/hopping to Ansible.

Can we discuss the principle of such a feature before trying to implement it against Ansible v2.x?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [January 29, 2017, 3:26pm UTC](https://forum.ansible.com/t/lxc-containers-management-on-remote-host/23587/2 "2017-01-29T15:26:36Z")

</div>

A LXC connection plugin was added about a year ago:

[https://github.com/ansible/ansible/commit/88482234e67b0966757413fc38130bdc4e3c888d](https://github.com/ansible/ansible/commit/88482234e67b0966757413fc38130bdc4e3c888d)

---

<div class="post-metadata">

**Author:** ![Thomas\_Szymanski](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@Thomas\_Szymanski](https://forum.ansible.com/u/Thomas_Szymanski)\
**Post date:** [January 29, 2017, 3:47pm UTC](https://forum.ansible.com/t/lxc-containers-management-on-remote-host/23587/3 "2017-01-29T15:47:36Z")

</div>

As I understand this plugin, it enables access to a container running on the host executing Ansible. I can't figure out a way to use it as it is for now to do the same for containers on a different (remote) host. The PR I pointed earlier looked like a way to do it.

Talking on the IRC channel teached me that connection chaining may need a complete redesign of connection plugins and I understand this can increase the maintenance costs. This is why I prefer do ask first. It may not be the best way to adress this use case (configuration of a container system on a remote host with Ansible playbooks) but it looks like there is no other straightforward way.
