commit
a0c49fe0ec
1 changed files with 13 additions and 1 deletions
|
@ -126,6 +126,15 @@ def unique(a):
|
|||
def intersect(a, b):
|
||||
return set(a).intersection(b)
|
||||
|
||||
def difference(a, b):
|
||||
return set(a).difference(b)
|
||||
|
||||
def symmetric_difference(a, b):
|
||||
return set(a).symmetric_difference(b)
|
||||
|
||||
def union(a, b):
|
||||
return set(a).union(b)
|
||||
|
||||
class FilterModule(object):
|
||||
''' Ansible core jinja2 filters '''
|
||||
|
||||
|
@ -183,5 +192,8 @@ class FilterModule(object):
|
|||
# list
|
||||
'unique' : unique,
|
||||
'intersect': intersect,
|
||||
'difference': difference,
|
||||
'symmetric_difference': symmetric_difference,
|
||||
'union': union,
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue