mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
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
|
||||
Reference in New Issue
Block a user