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 full name i.e. (crond.service).

However, I have this:

 - name: enable systemd-networkd
   systemd:
     name: systemd-networkd.service
     enabled: yes

And I get this:

TASK [systemd : enable systemd-networkd]
***********************************************************************************
fatal: [./chroot]: FAILED! => {"changed": false, "cmd": "/bin/systemctl", 
"msg": "Failed to connect to bus: No such file or directory", "rc": 1, 
"stderr": "Failed to connect to bus: No such file or directory\n", 
"stderr_lines": ["Failed to connect to bus: No such file or directory"], 
"stdout": "", "stdout_lines": []}
        to retry, use: --limit 
@/home/enrico/lavori/truelite/system/live/chroot.retry

I am not sure whether to give up with this kind of setup over a chroot,
or whether the documentation is unclear/wrong, or wheter I'm doing
something wrong. Looking for the issue on the internet I find traces of
past issues with this that are all supposed to be resolved in this
version of ansible.


Enrico

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ansible depends on:
ii  python                2.7.14-4
ii  python-crypto         2.6.1-8
ii  python-cryptography   2.1.4-1
ii  python-httplib2       0.9.2+dfsg-1
ii  python-jinja2         2.10-1
ii  python-netaddr        0.7.19-1
ii  python-paramiko       2.4.0-1
ii  python-pkg-resources  39.0.1-2
ii  python-yaml           3.12-1+b1

Versions of packages ansible recommends:
ii  python-jmespath   0.9.3-1
ii  python-kerberos   1.1.14-1
ii  python-libcloud   2.2.1-1
ii  python-selinux    2.7-2+b2
pn  python-winrm      <none>
ii  python-xmltodict  0.11.0-1

Versions of packages ansible suggests:
pn  cowsay   <none>
pn  sshpass  <none>

-- no debconf information

Reply via email to