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 . > drwxr-xr-x 21 root root 4096 Apr 11 14:02 .. > # systemctl is-enabled systemd-networkd > disabled
I had a look with strace, and ansible is trying to run systemd commands that would not work in a chroot: $ sudo strace -f -o trace ansible-playbook -v -i inventory.ini chroot.yaml $ grep execve.\\+systemctl trace 2386 execve("/bin/systemctl", ["/bin/systemctl", "show", "systemd-networkd.service"], 0x556a1d6423a0 /* 20 vars */ <unfinished ...> 2387 execve("/bin/systemctl", ["/bin/systemctl"], 0x556a1d6423a0 /* 20 vars */ <unfinished ...> Only enable/disable/is_enabled/mask/unmask are supposed to work, as far as I understand. Enrico -- GPG key: 4096R/634F4BD1E7AD5568 2009-05-08 Enrico Zini <enr...@enricozini.org>
signature.asc
Description: PGP signature