From 58261a42e9e0ada4e10b62d3f17d204b844a1be5 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Thu, 1 Mar 2018 16:10:58 +0300 Subject: [PATCH] Auto install of python-apt without recommends. 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) --- 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 327b42ee60..99bc7dc5a0 100644 --- a/lib/ansible/modules/packaging/os/apt.py +++ b/lib/ansible/modules/packaging/os/apt.py @@ -891,7 +891,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