'run the idempotent ansible code
prams comes from the ansible portion of this module
check_mode: does the module support check mode. (module.check_mode)'

@staticmethod
def run_ansible(params, check_mode=False):

    oc_label = OCLabel(params['name'], params['namespace'], params['kind'], params['kubeconfig'], params['labels'], params['selector'], verbose=params['debug'])
    state = params['state']
    name = params['name']
    selector = params['selector']
    api_rval = oc_label.get()
    if (state == 'list'):
        return {'changed': False, 'results': api_rval['results'], 'state': 'list'}
    if (state == 'add'):
        if (not (name or selector)):
            return {'failed': True, 'msg': "Param    'name'    or    'selector'    is    required    if    state    ==    'add'"}
        if (not oc_label.all_user_labels_exist()):
            if check_mode:
                return {'changed': False, 'msg': 'Would    have    performed    an    addition.'}
            api_rval = oc_label.add()
            if (api_rval['returncode'] != 0):
                return {'failed': True, 'msg': api_rval}
            return {'changed': True, 'results': api_rval, 'state': 'add'}
        return {'changed': False, 'state': 'add'}
    if (state == 'absent'):
        if (not (name or selector)):
            return {'failed': True, 'msg': "Param    'name'    or    'selector'    is    required    if    state    ==    'absent'"}
        if oc_label.any_label_exists():
            if check_mode:
                return {'changed': False, 'msg': 'Would    have    performed    a    delete.'}
            api_rval = oc_label.delete()
            if (api_rval['returncode'] != 0):
                return {'failed': True, 'msg': api_rval}
            return {'changed': True, 'results': api_rval, 'state': 'absent'}
        return {'changed': False, 'state': 'absent'}
    if (state == 'present'):
        if (not (name or selector)):
            return {'failed': True, 'msg': "Param    'name'    or    'selector'    is    required    if    state    ==    'present'"}
        if ((not oc_label.all_user_labels_exist()) or oc_label.extra_current_labels()):
            if check_mode:
                return {'changed': False, 'msg': 'Would    have    made    changes.'}
            api_rval = oc_label.replace()
            if (api_rval['returncode'] != 0):
                return {'failed': True, 'msg': api_rval}
            api_rval = oc_label.get()
            if (api_rval['returncode'] != 0):
                return {'failed': True, 'msg': api_rval}
            return {'changed': True, 'results': api_rval, 'state': 'present'}
        return {'changed': False, 'results': api_rval, 'state': 'present'}
    return {'failed': True, 'changed': False, 'results': ('Unknown    state    passed.    %s' % state), 'state': 'unknown'}
