1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

added union filter

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
Brian Coca 2013-11-19 14:40:55 -05:00
parent afe30a6633
commit 460bbfaec1

View file

@ -132,6 +132,9 @@ def difference(a, b):
def symetric_difference(a, b):
return set(a).symetric_difference(b)
def union(a, b):
return set(a).union(b)
class FilterModule(object):
''' Ansible core jinja2 filters '''
@ -191,5 +194,6 @@ class FilterModule(object):
'intersect': intersect,
'difference': difference,
'symetric_difference': symetric_difference,
'union': union,
}