mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
Do not return failure when the package is installed and nothing is done (#1852)
This commit is contained in:
parent
a367a9ac01
commit
87be961c1d
1 changed files with 2 additions and 1 deletions
|
@ -225,9 +225,10 @@ def main():
|
||||||
else:
|
else:
|
||||||
result['changed'] = False
|
result['changed'] = False
|
||||||
|
|
||||||
|
# rc will be none when the package already was installed and no action took place
|
||||||
# Only return failed=False when the returncode is known to be good as there may be more
|
# Only return failed=False when the returncode is known to be good as there may be more
|
||||||
# undocumented failure return codes
|
# undocumented failure return codes
|
||||||
if rc not in (0, 2, 10, 20):
|
if rc not in (None, 0, 2, 10, 20):
|
||||||
result['failed'] = True
|
result['failed'] = True
|
||||||
else:
|
else:
|
||||||
result['failed'] = False
|
result['failed'] = False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue