mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
postgresql: Cast sorted_old_postgres_pods as list (#1791)
With ansible 2.9.27 (operator-sdk v1.27.0) then the reverse filter returns an iterator so we need to cast it to list. The behavior doesn't exist when using a more recent operator-sdk version like v1.34.0 (ansible-core 2.15.8) but using the list filter on that version works too (even if not needed) "sorted_old_postgres_pods": "<list_reverseiterator object at 0x7f539eaa5610>" Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
This commit is contained in:
@@ -129,7 +129,7 @@
|
||||
set_fact:
|
||||
sorted_old_postgres_pods: "{{ filtered_old_postgres_pods |
|
||||
sort(attribute='metadata.name') |
|
||||
reverse }}"
|
||||
reverse | list }}"
|
||||
when: filtered_old_postgres_pods | length
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user