|
|
@ -318,14 +318,14 @@ def main():
|
|
|
|
return 1, str(e)
|
|
|
|
return 1, str(e)
|
|
|
|
|
|
|
|
|
|
|
|
elif 'state' in params:
|
|
|
|
elif 'state' in params:
|
|
|
|
if 'pkg' not in params:
|
|
|
|
pkg = params.get('pkg', params.get('package', params.get('name', None)))
|
|
|
|
|
|
|
|
if 'pkg' is None:
|
|
|
|
results['msg'] = "No pkg specified"
|
|
|
|
results['msg'] = "No pkg specified"
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
my = yum_base(conf_file=params['conf_file'], cachedir=True)
|
|
|
|
my = yum_base(conf_file=params['conf_file'], cachedir=True)
|
|
|
|
state = params['state']
|
|
|
|
state = params['state']
|
|
|
|
pkgspec = params['pkg']
|
|
|
|
results = ensure(my, state, pkg)
|
|
|
|
results = ensure(my, state, pkgspec)
|
|
|
|
|
|
|
|
except Exception, e:
|
|
|
|
except Exception, e:
|
|
|
|
return 1, str(e)
|
|
|
|
return 1, str(e)
|
|
|
|
|
|
|
|
|
|
|
|