I get an exception when I run my playbook: “Task failed: not enough values to unpack (expected 4, got 2)”
When I run ansible myhost -m ping -i hosts.yml -u root, everthing is ok.
When I run any playbook (even targeting my OpenWRT-hosts which don’t have Python installed) it looks like this:
TASK [Gathering Facts] *********************************************************************************************************************************************************************************************
task path: /home/alex/infrastructure/site.yml:75
<myhost> ESTABLISH SSH CONNECTION FOR USER: root
<myhost> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/alex/.ansible/cp/f356a65c1b"' -o NumberOfPasswordPrompts=1 myhost '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
<myhost> (0, b'/root\n', b'')
<myhost> ESTABLISH SSH CONNECTION FOR USER: root
<myhost> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/alex/.ansible/cp/f356a65c1b"' -o NumberOfPasswordPrompts=1 myhost '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1760893884.438878-21775-191142939758709 `" && echo ansible-tmp-1760893884.438878-21775-191142939758709="` echo /root/.ansible/tmp/ansible-tmp-1760893884.438878-21775-191142939758709 `" ) && sleep 0'"'"''
<myhost> (0, b'ansible-tmp-1760893884.438878-21775-191142939758709=/root/.ansible/tmp/ansible-tmp-1760893884.438878-21775-191142939758709\n', b'')
<myhost> ESTABLISH SSH CONNECTION FOR USER: root
<myhost> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/alex/.ansible/cp/f356a65c1b"' -o NumberOfPasswordPrompts=1 myhost '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1760893884.438878-21775-191142939758709/ > /dev/null 2>&1 && sleep 0'"'"''
<myhost> (0, b'', b'')
[ERROR]: Task failed: not enough values to unpack (expected 4, got 2)
fatal: [myhost]: FAILED! => {
"changed": false,
"msg": "Task failed: not enough values to unpack (expected 4, got 2)"
}
When I start it using the debugger, all I get is that Ansible itself does not know where or why this error did happen:
formatted_source_context=None,
formatted_traceback=None,
My versions on an Arch default install:
$ ansible --version
ansible [core 2.19.3]
config file = /home/alex/infrastructure/ansible.cfg
configured module search path = ['/home/alex/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.13/site-packages/ansible
ansible collection location = /home/alex/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.13.7 (main, Aug 15 2025, 12:34:02) [GCC 15.2.1 20250813] (/usr/bin/python)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)
How would I diagnose this any further?
Best regards,
Alex

