# A systemd-nspawn connection driver

**URL:** <https://forum.ansible.com/t/a-systemd-nspawn-connection-driver/20491>\
**Category:** Ansible Developer\
**Created:** [February 8, 2016, 9:48pm UTC](https://forum.ansible.com/t/a-systemd-nspawn-connection-driver/20491 "2016-02-08T21:48:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![larsks](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/larsks/32/9640_2.png) [@larsks](https://forum.ansible.com/u/larsks)\
**Post date:** [February 8, 2016, 9:48pm UTC](https://forum.ansible.com/t/a-systemd-nspawn-connection-driver/20491/1 "2016-02-08T21:48:59Z")

</div>

I’ve submitted a patch that adds a systemd-nspawn connection driver to Ansible. It started out as a clone of the existing “chroot” driver, but it’s a lot easier to use (since nspawn takes care of setting up things like /dev, /proc, and /sys inside the “chroot” environment).

The pull request is here:

[https://github.com/ansible/ansible/pull/14334](https://github.com/ansible/ansible/pull/14334)

And I’ve put a short blog post together with more examples here:

[http://blog.oddbit.com/2016/02/08/a-systemd-nspawn-connection-driver-for-a/](http://blog.oddbit.com/2016/02/08/a-systemd-nspawn-connection-driver-for-a/)

I’ve actually been using this locally to drive the creation of Raspberry Pi disk images, since with this driver in place it’s trivial to target mounted ARM-filesystems from my x86\_64 host.
