diff options
author | Seth Vidal <skvidal@fedoraproject.org> | 2012-03-10 02:19:57 -0500 |
---|---|---|
committer | Seth Vidal <skvidal@fedoraproject.org> | 2012-03-10 02:19:57 -0500 |
commit | a99b491b321e0f8d5c74d1b5bc85d72a75ae144d (patch) | |
tree | e52b564cd2041d67d50e339c247aefbb4b9e086e | |
parent | 209760f8f60ec24e3ccb176914965cd1e223abe4 (diff) | |
download | ansible-a99b491b321e0f8d5c74d1b5bc85d72a75ae144d.tar.gz |
touch up to yum module.
fix a couple of bugs
comment about state='latest'
-rwxr-xr-x | library/yum | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/library/yum b/library/yum index b686593b29..cb7622bced 100755 --- a/library/yum +++ b/library/yum @@ -77,7 +77,7 @@ def list_stuff(my, stuff): s = 'disabled' if repo.enabled: s = 'enabled' - r[repo.id] = s + t[repo.id] = s r.append(t) return r @@ -179,7 +179,12 @@ def ensure(my, state, pkgspec): 'failed': failed, 'results':out, 'errors': err } - + #if state == 'latest': + # check to see if this pkg is in an update + # if it is - update it and check to see if it applied + # if it is not - then return + # return { 'changed':False, 'failed':False, 'results':'', 'errors':'' } + return {'changed': False, 'failed': True, 'results':'', @@ -205,9 +210,11 @@ def main(): # update="args"? # - results = {} + args = " ".join(sys.argv[1:]) items = shlex.split(args) + # if nothing else changes - it fails + results = { 'changed':False, 'failed':True, 'results':'', 'errors':args } params = {} for x in items: (k, v) = x.split("=", 1) |