Commit 11a819cc by Michael DeHaan

Merge pull request #2631 from stoned/templates-filters-base64

Add base64 encode and decode filters to templates
parents a6777f7e 08935626
......@@ -15,6 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import base64
import json
import yaml
......@@ -31,6 +32,10 @@ class FilterModule(object):
def filters(self):
return {
# base 64
'b64decode': base64.b64decode,
'b64encode': base64.b64encode,
# json
'to_json': json.dumps,
'to_nice_json': to_nice_json,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment