Skip to content

Playbook 3_setup_kvm_host.yaml fails with Error rendering template: Type 'range' is unsupported for variable storage. #444

Description

@abdulkandathil

Getting following error when running 3_setup_kvm_host.yaml from mac.

Ansible version

➜   ansible --version
ansible [core 2.20.0]
  config file = /Users/abdulkandathil/ibm/git/Ansible-OpenShift-Provisioning/ansible.cfg
  configured module search path = ['/Users/abdulkandathil/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/13.0.0/libexec/lib/python3.14/site-packages/ansible
  ansible collection location = /Users/abdulkandathil/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.14.0 (main, Oct  7 2025, 09:34:52) [Clang 17.0.0 (clang-1700.3.19.1)] (/opt/homebrew/Cellar/ansible/13.0.0/libexec/bin/python)
  jinja version = 3.1.6
  pyyaml version = 6.0.3 (with libyaml v0.2.5)
➜  

Error:

TASK [configure_storage : Ensure qemu has execute permissions for all parent directories of the directory that will be used as a storage pool for this cluster.] *************************************************************************************************************************************************************************
[ERROR]: Error rendering template: Type 'range' is unsupported for variable storage.

Error rendering template.
Origin: /Users/abdulkandathil/ibm/git/Ansible-OpenShift-Provisioning/roles/configure_storage/tasks/main.yaml:71:9

69     mode: g+x
70     recurse: false
71   loop: "{{ range( 0, storage.pool_path.split('/') | length + 1 ) }}"
           ^ column 9

<<< caused by >>>

Type 'range' is unsupported for variable storage.
Origin: <unknown>

range(0, 6)

fatal: [m42lp40]: FAILED! => {"msg": "Error rendering template: Type 'range' is unsupported for variable storage."}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions