mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-05 02:03:09 +00:00
Correctly report "changed: false" when trying to install a package not in the catalog. This fixes #230
This commit is contained in:
committed by
Matt Clay
parent
0ea2cf77dd
commit
474df33ff3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user