diff --git a/lib/ansible/modules/extras/packaging/os/svr4pkg.py b/lib/ansible/modules/extras/packaging/os/svr4pkg.py index 882b679f7b2..149238171bf 100644 --- a/lib/ansible/modules/extras/packaging/os/svr4pkg.py +++ b/lib/ansible/modules/extras/packaging/os/svr4pkg.py @@ -225,9 +225,10 @@ def main(): else: 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 # undocumented failure return codes - if rc not in (0, 2, 10, 20): + if rc not in (None, 0, 2, 10, 20): result['failed'] = True else: result['failed'] = False