-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Description
What happened?
TASK [container-engine/runc : download_file | Download item] *****************************************************************************************************************************************************************************************************************************************************************
task path: /home/ubuntu/kubespray/roles/download/tasks/download_file.yml:81
The full traceback is:
Traceback (most recent call last):
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/executor/task_executor.py", line 515, in _execute
self._task.post_validate(templar=templar)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/playbook/task.py", line 285, in post_validate
super(Task, self).post_validate(templar)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/playbook/base.py", line 650, in post_validate
value = templar.template(getattr(self, name))
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/template/init.py", line 930, in template
d[k] = self.template(
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/template/init.py", line 886, in template
result = self.do_template(
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/template/init.py", line 1156, in do_template
res = j2_concat(rf)
File "", line 13, in root
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/template/init.py", line 298, in wrapper
ret = func(*args, **kwargs)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/plugins/filter/core.py", line 235, in rand
return r.choice(end)
File "/usr/local/python-3.10.19/lib/python3.10/random.py", line 378, in choice
return seq[self._randbelow(len(seq))]
IndexError: list index out of range
fatal: [node1 -> {{ download_delegate if download_force_cache else inventory_hostname }}]: FAILED! => {
"changed": false
}
What did you expect to happen?
this task shoul run successfully
TASK [container-engine/runc : download_file | Download item]
How can we reproduce it (as minimally and precisely as possible)?
ansible-playbook -i inventory/mycluster/hosts.yml -u ubuntu --become -K cluster.yml -vvv
OS
Ubuntu 24
Version of Ansible
ansible [core 2.12.5]
config file = /home/ubuntu/kubespray/ansible.cfg
configured module search path = ['/home/ubuntu/kubespray/library']
ansible python module location = /home/ubuntu/.venv/lib/python3.10/site-packages/ansible
ansible collection location = /home/ubuntu/.ansible/collections:/usr/share/ansible/collections
executable location = /home/ubuntu/.venv/bin/ansible
python version = 3.10.19 (main, Jan 28 2026, 15:39:29) [GCC 13.2.0]
jinja version = 2.11.3
libyaml = True
Version of Python
Python 3.10.19
Version of Kubespray (commit)
Network plugin used
calico
Full inventory with variables
Command used to invoke ansible
ansible-playbook -i inventory/mycluster/hosts.yml -u ubuntu --become -K cluster.yml -vvv
Output of ansible run
TASK [container-engine/runc : download_file | Download item] *****************************************************************************************************************************************************************************************************************************************************************
task path: /home/ubuntu/kubespray/roles/download/tasks/download_file.yml:81
The full traceback is:
Traceback (most recent call last):
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/executor/task_executor.py", line 515, in _execute
self._task.post_validate(templar=templar)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/playbook/task.py", line 285, in post_validate
super(Task, self).post_validate(templar)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/playbook/base.py", line 650, in post_validate
value = templar.template(getattr(self, name))
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/template/init.py", line 930, in template
d[k] = self.template(
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/template/init.py", line 886, in template
result = self.do_template(
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/template/init.py", line 1156, in do_template
res = j2_concat(rf)
File "", line 13, in root
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/template/init.py", line 298, in wrapper
ret = func(*args, **kwargs)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/ansible/plugins/filter/core.py", line 235, in rand
return r.choice(end)
File "/usr/local/python-3.10.19/lib/python3.10/random.py", line 378, in choice
return seq[self._randbelow(len(seq))]
IndexError: list index out of range
fatal: [node1 -> {{ download_delegate if download_force_cache else inventory_hostname }}]: FAILED! => {
"changed": false
}
Anything else we need to know
No response