From f0cc2d6efeb76586ad5e22baf2328ce0f4c1b9ee Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Thu, 19 Sep 2013 09:38:22 +0100 Subject: [PATCH] Added md5 as a jinja filter - returns hex digest of input --- lib/ansible/runner/filter_plugins/core.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/runner/filter_plugins/core.py b/lib/ansible/runner/filter_plugins/core.py index 9ca81218fe..30b4e30b1a 100644 --- a/lib/ansible/runner/filter_plugins/core.py +++ b/lib/ansible/runner/filter_plugins/core.py @@ -22,6 +22,7 @@ import yaml import types import pipes from ansible import errors +from ansible.utils import md5s def to_nice_yaml(*a, **kw): '''Make verbose, human readable yaml''' @@ -111,5 +112,8 @@ class FilterModule(object): # quote string for shell usage 'quote': quote, + + # md5 hex digest of string + 'md5': md5s, }