diff --git a/library/apt b/library/apt index 29188d67a8..be4e491ddf 100755 --- a/library/apt +++ b/library/apt @@ -90,7 +90,7 @@ def install(m, pkgspec, cache, upgrade=False, default_release=None, install_reco rc, out, err = run_apt(cmd) if rc: - m.fail_json(msg="'apt-get install %s' failed: %s" % (pkgspec, err)) + m.fail_json(msg="'apt-get install %s' failed: %s" % (packages, err)) else: m.exit_json(changed=True) else: