mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #4168 from nigelm/md5_filter
Added md5 as a jinja filter - returns hex digest of input
This commit is contained in:
commit
7f8126a6c9
1 changed files with 4 additions and 0 deletions
|
@ -22,6 +22,7 @@ import yaml
|
||||||
import types
|
import types
|
||||||
import pipes
|
import pipes
|
||||||
from ansible import errors
|
from ansible import errors
|
||||||
|
from ansible.utils import md5s
|
||||||
|
|
||||||
def to_nice_yaml(*a, **kw):
|
def to_nice_yaml(*a, **kw):
|
||||||
'''Make verbose, human readable yaml'''
|
'''Make verbose, human readable yaml'''
|
||||||
|
@ -111,5 +112,8 @@ class FilterModule(object):
|
||||||
|
|
||||||
# quote string for shell usage
|
# quote string for shell usage
|
||||||
'quote': quote,
|
'quote': quote,
|
||||||
|
|
||||||
|
# md5 hex digest of string
|
||||||
|
'md5': md5s,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue