Add a connector for systemd-nspawn (systemd container)
systemd-nspawn offers lightweight containers. Chroot, but better, with optional network isolation, and features to automatically manage privileges, bind mounts.
Containers are long-lived, stored in a raw folder, usually in /var/lib/machines, and they can be booted using the systemd-nspawn command or using systemd services (and can be booted at startup). machinectl can then manage the containers. A container is identified with a name, and machinectl can also operate on a remote host.
machinectl shell can be used to run shell commands. machinectl also has copy-from and copy-to, so while copying from/to the directory directly works, there is a convenient wrapper for file transfers like what docker provides. There's also machinectl bind to add bind mounts.
Being able to set up a nspawn container using pyinfra would seem quite fitting :-)
@Fizzadar has stated that he won't accept more connectors into the core pyinfra project, but connectors can be maintained as external projects.