Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt: use --auto-remove with dist-upgrade #37594

Merged
merged 1 commit into from
Mar 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/ansible/modules/packaging/os/apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def cleanup(m, purge=False, force=False, operation=None,

def upgrade(m, mode="yes", force=False, default_release=None,
use_apt_get=False,
dpkg_options=expand_dpkg_options(DPKG_OPTIONS), autoremove=None):
dpkg_options=expand_dpkg_options(DPKG_OPTIONS), autoremove=False):

if autoremove:
autoremove = '--auto-remove'
Expand All @@ -732,7 +732,7 @@ def upgrade(m, mode="yes", force=False, default_release=None,
if mode == "dist" or (mode == "full" and use_apt_get):
# apt-get dist-upgrade
apt_cmd = APT_GET_CMD
upgrade_command = "dist-upgrade"
upgrade_command = "dist-upgrade %s" % (autoremove)
elif mode == "full" and not use_apt_get:
# aptitude full-upgrade
apt_cmd = APTITUDE_CMD
Expand Down