added union filter
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
This commit is contained in:
parent
afe30a6633
commit
460bbfaec1
1 changed files with 4 additions and 0 deletions
|
@ -132,6 +132,9 @@ def difference(a, b):
|
||||||
def symetric_difference(a, b):
|
def symetric_difference(a, b):
|
||||||
return set(a).symetric_difference(b)
|
return set(a).symetric_difference(b)
|
||||||
|
|
||||||
|
def union(a, b):
|
||||||
|
return set(a).union(b)
|
||||||
|
|
||||||
class FilterModule(object):
|
class FilterModule(object):
|
||||||
''' Ansible core jinja2 filters '''
|
''' Ansible core jinja2 filters '''
|
||||||
|
|
||||||
|
@ -191,5 +194,6 @@ class FilterModule(object):
|
||||||
'intersect': intersect,
|
'intersect': intersect,
|
||||||
'difference': difference,
|
'difference': difference,
|
||||||
'symetric_difference': symetric_difference,
|
'symetric_difference': symetric_difference,
|
||||||
|
'union': union,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue