'run the ansible idempotent code'

@staticmethod
def run_ansible(params, check_mode):

    ocedit = Edit(params['kind'], params['namespace'], params['name'], kubeconfig=params['kubeconfig'], separator=params['separator'], verbose=params['debug'])
    api_rval = ocedit.get()
    if (not Utils.exists(api_rval['results'], params['name'])):
        return {'failed': True, 'msg': api_rval}
    if check_mode:
        return {'changed': True, 'msg': 'CHECK_MODE:    Would    have    performed    edit'}
    api_rval = ocedit.update(params['file_name'], params['content'], params['force'], params['file_format'])
    if (api_rval['returncode'] != 0):
        return {'failed': True, 'msg': api_rval}
    if (('updated' in api_rval) and (not api_rval['updated'])):
        return {'changed': False, 'results': api_rval, 'state': 'present'}
    api_rval = ocedit.get()
    if (api_rval['returncode'] != 0):
        return {'failed': True, 'msg': api_rval}
    return {'changed': True, 'results': api_rval, 'state': 'present'}
