mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07: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:
parent
c72b337327
commit
92b388817f
5 changed files with 38 additions and 0 deletions
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([])"
|
Loading…
Add table
Add a link
Reference in a new issue