Bug#895550: Cannot enable systemd units in a chroot

2019-02-11 Thread Lee Garrett
Hi Enrico, On Thu, 12 Apr 2018 23:18:57 +0200 Enrico Zini wrote: > On Thu, Apr 12, 2018 at 10:33:38PM +0200, Enrico Zini wrote: > > > On the other hand, is-enabled works without /proc, so it looks like > > ansible's systemd module is running systemd in ways that can't work > > inside a chroot:

Bug#895550: Cannot enable systemd units in a chroot

2018-04-12 Thread Enrico Zini
On Thu, Apr 12, 2018 at 10:33:38PM +0200, Enrico Zini wrote: > On the other hand, is-enabled works without /proc, so it looks like > ansible's systemd module is running systemd in ways that can't work > inside a chroot: > > # ls -la /proc > total 8 > drwxr-xr-x 2 root root 4096 Feb 23 23:23 . >

Bug#895550: Cannot enable systemd units in a chroot

2018-04-12 Thread Enrico Zini
On Thu, Apr 12, 2018 at 10:19:44PM +0200, Enrico Zini wrote: > I found that systemctl wants /proc to be mounted in order to detect it's > running in a chroot: > > # systemctl > Failed to connect to bus: No such file or directory > # mount -t proc none /proc > # systemctl > Running in

Bug#895550: Cannot enable systemd units in a chroot

2018-04-12 Thread Enrico Zini
On Thu, Apr 12, 2018 at 03:36:55PM +0200, Enrico Zini wrote: > TASK [systemd : enable systemd-networkd] > *** > fatal: [./chroot]: FAILED! => {"changed": false, "cmd": "/bin/systemctl", > "msg": "Failed to connect

Bug#895550: Cannot enable systemd units in a chroot

2018-04-12 Thread Enrico Zini
Package: ansible Version: 2.5.0+dfsg-1 Severity: normal Hello, according to https://docs.ansible.com/ansible/latest/modules/systemd_module.html it should be possible to run it in a chroot, as it says: Name of the service. When using in a chroot environment you always need to specify the