'run the ansible idempotent code'

@staticmethod
def run_ansible(params, check_mode):

    repoquery = Repoquery(params['name'], params['query_type'], params['show_duplicates'], params['match_version'], params['ignore_excluders'], params['verbose'])
    state = params['state']
    if (state == 'list'):
        results = repoquery.repoquery()
        if (results['returncode'] != 0):
            return {'failed': True, 'msg': results}
        return {'changed': False, 'results': results, 'state': 'list', 'check_mode': check_mode}
    return {'failed': True, 'changed': False, 'msg': ('Unknown    state    passed.    %s' % state), 'state': 'unknown'}
