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 chroot, ignoring request. > > I wonder if it's supposed to do that, or if it's a bug in systemctl.
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 . drwxr-xr-x 21 root root 4096 Apr 11 14:02 .. # systemctl is-enabled systemd-networkd disabled Enrico -- GPG key: 4096R/634F4BD1E7AD5568 2009-05-08 Enrico Zini <enr...@enricozini.org>
Description: PGP signature