Correctly report "changed: false" when trying to install a package not in the catalog. This fixes #230
This commit is contained in:
parent
0ea2cf77dd
commit
474df33ff3
1 changed files with 8 additions and 3 deletions
|
@ -162,10 +162,15 @@ def main():
|
|||
(rc, out, err) = package_uninstall(module, name)
|
||||
out = out[:75]
|
||||
|
||||
if rc is None:
|
||||
result['changed'] = False
|
||||
else:
|
||||
if rc == 0:
|
||||
result['changed'] = True
|
||||
else:
|
||||
result['changed'] = False
|
||||
|
||||
if rc is not None and rc != 0:
|
||||
result['failed'] = True
|
||||
else:
|
||||
result['failed'] = False
|
||||
|
||||
if out:
|
||||
result['stdout'] = out
|
||||
|
|
Loading…
Reference in a new issue