diff --git a/lib/ansible/modules/extras/packaging/os/zypper.py b/lib/ansible/modules/extras/packaging/os/zypper.py index 196a7e2..7f63482 100644 --- a/lib/ansible/modules/extras/packaging/os/zypper.py +++ b/lib/ansible/modules/extras/packaging/os/zypper.py @@ -192,6 +192,11 @@ def package_latest(m, name, installed_state, disable_gpg_check, disable_recommen cmd.extend(name) rc, stdout, stderr = m.run_command(cmd, check_rc=False) + # return if an error occured while installation + # otherwise error messages will be lost and user doesn`t see any error + if rc: + return (rc, stdout, stderr, changed) + # if we've already made a change, we don't have to check whether a version changed if not changed: post_upgrade_versions = get_current_version(m, name)