Correctly report "changed: false" when trying to install a package not in the catalog. This fixes #230

This commit is contained in:
Dagobert Michelsen 2015-01-31 22:12:40 +01:00
parent 41d5029012
commit df5e1946aa

View file

@ -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