mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Added stub implementation of filters
This commit is contained in:
@@ -117,9 +117,11 @@ def json_loads(data):
|
||||
|
||||
return json.loads(data)
|
||||
|
||||
def parse_json(data):
|
||||
def parse_json(raw_data):
|
||||
''' this version for module return data only '''
|
||||
|
||||
data = filter_leading_garbage(raw_data)
|
||||
|
||||
try:
|
||||
return json.loads(data)
|
||||
except:
|
||||
@@ -409,3 +411,9 @@ def do_encrypt(result, encrypt, salt_size=None, salt=None):
|
||||
|
||||
return result
|
||||
|
||||
def last_non_blank_line(lines):
|
||||
return lines
|
||||
|
||||
def filter_leading_garbage(lines):
|
||||
return lines
|
||||
|
||||
|
||||
Reference in New Issue
Block a user