usage = "The module expects arguments of the following forms: state=<installed|removed|latest> pkg=<pkgspec> OR list=<installed|updates|available|repos|pkgspec>. pkgspec is nothing but the package specification. Example: google-chrome-stable.i386"
if not len(params):
module.fail_json(msg=usage)
# if nothing else changes - it fails
results = { 'changed':False,
'failed':True,
'results':'',
'errors':'',
'msg':usage }
if 'conf_file' not in params:
params['conf_file'] = None
if 'list' in params and 'pkg' in params:
module.fail_json(msg="expected 'list=' or 'name=', but not both")