def fail_json(*args, **kwargs):
    'function to patch over fail_json; package return data into an exception'
    kwargs['failed'] = True
    raise AnsibleFailJson(kwargs)
function to patch over fail_json; package return data into an exception
def fail_json(*args, **kwargs):
    
    kwargs['failed'] = True
    raise AnsibleFailJson(kwargs)