1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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)
This commit is contained in:
Ivan Mikheykin 2018-03-01 16:10:58 +03:00 committed by Brian Coca
parent 3134ba6bee
commit 58261a42e9

View file

@ -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