From 5be6a3ef58b0fd6d20e2e9d3ec8b29d5e7c02ba2 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Wed, 9 May 2018 10:51:38 +0200 Subject: [PATCH] Auto install of python-apt without recommends. (#39409) debian:9 `apt-get install python-apt` - this will install python2.7 and python3 After this operation, *88.4 MB* of additional disk space will be used. `apt-get install --no-install-recommends python-apt` - only python2.7 After this operation, *35.0 MB* of additional disk space will be used. (cherry picked from commit c542e62) (cherry picked from commit 58261a42e9e0ada4e10b62d3f17d204b844a1be5) --- lib/ansible/modules/packaging/os/apt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/packaging/os/apt.py b/lib/ansible/modules/packaging/os/apt.py index fd43a36e324..94cc4f1bf15 100644 --- a/lib/ansible/modules/packaging/os/apt.py +++ b/lib/ansible/modules/packaging/os/apt.py @@ -893,7 +893,7 @@ def main(): "If run normally this module can auto-install it." % PYTHON_APT) try: module.run_command(['apt-get', 'update'], check_rc=True) - module.run_command(['apt-get', 'install', PYTHON_APT, '-y', '-q'], check_rc=True) + module.run_command(['apt-get', 'install', '--no-install-recommends', PYTHON_APT, '-y', '-q'], check_rc=True) global apt, apt_pkg import apt import apt.debfile