mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
parent
b80854ff50
commit
0f88c71f59
5 changed files with 100 additions and 0 deletions
2
tests/integration/targets/filter_list/aliases
Normal file
2
tests/integration/targets/filter_list/aliases
Normal file
|
@ -0,0 +1,2 @@
|
|||
shippable/posix/group2
|
||||
skip/python2.6 # filters are controller only, and we no longer support Python 2.6 on the controller
|
6
tests/integration/targets/filter_list/tasks/main.yml
Normal file
6
tests/integration/targets/filter_list/tasks/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Test lists merged by attribute name
|
||||
assert:
|
||||
that:
|
||||
- "(list1 | community.general.lists_mergeby(list2, 'name') | list |
|
||||
difference(list3) | length) == 0"
|
22
tests/integration/targets/filter_list/vars/main.yml
Normal file
22
tests/integration/targets/filter_list/vars/main.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
list1:
|
||||
- name: myname01
|
||||
param01: myparam01
|
||||
- name: myname02
|
||||
param01: myparam02
|
||||
|
||||
list2:
|
||||
- name: myname01
|
||||
param01: myparam03
|
||||
- name: myname02
|
||||
param02: myparam04
|
||||
- name: myname03
|
||||
param03: myparam03
|
||||
|
||||
list3:
|
||||
- name: myname01
|
||||
param01: myparam03
|
||||
- name: myname02
|
||||
param01: myparam02
|
||||
param02: myparam04
|
||||
- name: myname03
|
||||
param03: myparam03
|
Loading…
Add table
Add a link
Reference in a new issue