From a6315043efcee40dc1c31ac78957dd0b3340023a Mon Sep 17 00:00:00 2001 From: Conrado Buhrer Date: Mon, 26 Jan 2015 17:48:03 -0200 Subject: [PATCH] fixed: missing check for upgrade flag --- lib/ansible/modules/packaging/os/apt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/packaging/os/apt.py b/lib/ansible/modules/packaging/os/apt.py index e00ec4b98d7..93809602afa 100644 --- a/lib/ansible/modules/packaging/os/apt.py +++ b/lib/ansible/modules/packaging/os/apt.py @@ -608,7 +608,8 @@ def main(): if p['state'] in ('latest', 'present', 'build-dep'): build_dep = p.get('build-dep', False) - result = install(module, packages, cache, upgrade=True, + upgrade = p.get('latest', False) + result = install(module, packages, cache, upgrade=upgrade, default_release=p['default_release'], install_recommends=install_recommends, force=force_yes, dpkg_options=dpkg_options,