[Bug 1224417] New: ansible jinja template fails on dict.keys() call
https://bugzilla.suse.com/show_bug.cgi?id=1224417 Bug ID: 1224417 Summary: ansible jinja template fails on dict.keys() call Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.5 Hardware: All OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: rdd80@rdd.nu QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0 Build Identifier: After upgrade to ansible-2.9.27-150000.1.17.2.noarch the following fails: $ rpm -qa ansible ansible-2.9.27-150000.1.17.2.noarch $ ansible -m debug -a 'msg="{{ {\"a\": 3}.keys() }}"' localhost localhost | FAILED! => { "msg": "Unexpected templating type error occurred on ({{ {\"a\": 3}.keys() }}): unhashable type: 'dict'" } On a system with the previous version ansible-2.9.27-bp155.2.16.noarch installed, it works: $ rpm -qa ansible ansible-2.9.27-bp155.2.16.noarch $ ansible -m debug -a 'msg="{{ {\"a\": 3}.keys() }}"' localhost localhost | SUCCESS => { "msg": "dict_keys(['a'])" } Reproducible: Always Steps to Reproduce: 1. zypper in ansible 2. ansible -m debug -a 'msg="{{ {\"a\": 3}.keys() }}"' localhost Actual Results: localhost | FAILED! => { "msg": "Unexpected templating type error occurred on ({{ {\"a\": 3}.keys() }}): unhashable type: 'dict'" } Expected Results: localhost | SUCCESS => { "msg": "dict_keys(['a'])" } -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1224417 https://bugzilla.suse.com/show_bug.cgi?id=1224417#c2 --- Comment #2 from Richard Dörwaldt <rdd80@rdd.nu> --- (In reply to Johannes Kastl from comment #1)
Hi,
thanks for the bug report, but ansible 2.9.27 is EOL and has been for some years. There are recent packages available for Tumbleweed.
For Leap15 and SLES15 work is done to get those into PackageHub/Backports.
I planned to build packages for 15.x in systemsmanagement:ansible, but this far only had time to prepare those in my home:
https://build.opensuse.org/project/show/home:ojkastl_buildservice: Branch_systemsmanagement_ansible
I strongly advise against using the old 2.9.x versions!
Kind Regards, Johannes
Thanks Johannes. I didn't realize it was that old. Is there any more current version available for leap 15.5 now or will that only be available once it makes it into backports? And will that then be based on the version you linked? BR/richard -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com