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"
ifnotlen(params):
module.fail_json(msg=usage)
# if nothing else changes - it fails
results={'changed':False,
'failed':True,
'results':'',
'errors':'',
'msg':usage}
if'conf_file'notinparams:
params['conf_file']=None
if'list'inparamsand'pkg'inparams:
module.fail_json(msg="expected 'list=' or 'name=', but not both")