mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
* Add dict and list_to_dict filters.
* Remove list_to_dict filter.
* Add myself as maintainer.
(cherry picked from commit b6ae47c455)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
2
tests/integration/targets/filter_dict/aliases
Normal file
2
tests/integration/targets/filter_dict/aliases
Normal file
@@ -0,0 +1,2 @@
|
||||
shippable/posix/group3
|
||||
skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller
|
||||
7
tests/integration/targets/filter_dict/tasks/main.yml
Normal file
7
tests/integration/targets/filter_dict/tasks/main.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: "Test dict filter"
|
||||
assert:
|
||||
that:
|
||||
- "[['a', 'b']] | community.general.dict == dict([['a', 'b']])"
|
||||
- "[['a', 'b'], [1, 2]] | community.general.dict == dict([['a', 'b'], [1, 2]])"
|
||||
- "[] | community.general.dict == dict([])"
|
||||
Reference in New Issue
Block a user