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

Do not install python-apt in check mode.

This commit is contained in:
Matt Clay 2016-01-31 02:51:34 -08:00
parent b5c9945485
commit 4288150270

View file

@ -579,6 +579,8 @@ def main():
module.run_command_environ_update = APT_ENV_VARS
if not HAS_PYTHON_APT:
if module.check_mode:
module.fail_json(msg="python-apt must be installed to use check mode")
try:
module.run_command('apt-get update && apt-get install python-apt -y -q --force-yes', use_unsafe_shell=True, check_rc=True)
global apt, apt_pkg