mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
Use newer is_sequence function instead of MutableSequence (#44331)
* Use newer is_sequence function instead of MutableSequence. Fixes #44327 * Add changelog for #44331 * Update changelog fragment to describe the fix in more detail
This commit is contained in:
parent
dcc4a38f98
commit
2bf6507c44
3 changed files with 6 additions and 2 deletions
|
@ -176,6 +176,7 @@
|
|||
flat_full: '{{orig_list|flatten}}'
|
||||
flat_one: '{{orig_list|flatten(levels=1)}}'
|
||||
flat_two: '{{orig_list|flatten(levels=2)}}'
|
||||
flat_tuples: '{{ [1,3] | zip([2,4]) | list | flatten }}'
|
||||
|
||||
- name: Verify flatten filter works as expected
|
||||
assert:
|
||||
|
@ -183,6 +184,7 @@
|
|||
- flat_full == [1, 2, 3, 4, 5, 6, 7]
|
||||
- flat_one == [1, 2, 3, [4, [5]], 6, 7]
|
||||
- flat_two == [1, 2, 3, 4, [5], 6, 7]
|
||||
- flat_tuples == [1, 2, 3, 4]
|
||||
vars:
|
||||
orig_list: [1, 2, [3, [4, [5]], 6], 7]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue