From c449ae2435f094d1ca4887263f2f91befce8d40f Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Tue, 9 Aug 2022 07:39:47 +1200 Subject: [PATCH] Reslash ansible filter. (Reverse Slash) --- filter_plugins/reslash.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 filter_plugins/reslash.py diff --git a/filter_plugins/reslash.py b/filter_plugins/reslash.py new file mode 100644 index 0000000..6e8450c --- /dev/null +++ b/filter_plugins/reslash.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +def filter_reslash(val): + return val.replace('\\', '/') + +class FilterModule(object): + filter_map = { + 'reslash': filter_reslash + } + + def filters(self): + return self.filter_map