Adjust setting to better make logic clearer
This commit is contained in:
parent
474df33ff3
commit
1ff1537329
1 changed files with 6 additions and 7 deletions
|
@ -162,15 +162,14 @@ def main():
|
||||||
(rc, out, err) = package_uninstall(module, name)
|
(rc, out, err) = package_uninstall(module, name)
|
||||||
out = out[:75]
|
out = out[:75]
|
||||||
|
|
||||||
if rc == 0:
|
if rc is None:
|
||||||
result['changed'] = True
|
# pkgutil was not executed because the package was already present/absent
|
||||||
else:
|
result['changed'] = False
|
||||||
|
elif rc == 0
|
||||||
|
result['changed'] = True
|
||||||
|
else
|
||||||
result['changed'] = False
|
result['changed'] = False
|
||||||
|
|
||||||
if rc is not None and rc != 0:
|
|
||||||
result['failed'] = True
|
result['failed'] = True
|
||||||
else:
|
|
||||||
result['failed'] = False
|
|
||||||
|
|
||||||
if out:
|
if out:
|
||||||
result['stdout'] = out
|
result['stdout'] = out
|
||||||
|
|
Loading…
Reference in a new issue