diff --git a/library/yum b/library/yum index da0d5ab492..87c2713d3e 100755 --- a/library/yum +++ b/library/yum @@ -318,14 +318,14 @@ def main(): return 1, str(e) 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" else: try: my = yum_base(conf_file=params['conf_file'], cachedir=True) state = params['state'] - pkgspec = params['pkg'] - results = ensure(my, state, pkgspec) + results = ensure(my, state, pkg) except Exception, e: return 1, str(e)