mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Explicit check of return code for autoinstallation of python-apt added
This will allow easier debugging through more meaningful error message.
This commit is contained in:
@@ -432,7 +432,7 @@ def main():
|
||||
|
||||
if not HAS_PYTHON_APT:
|
||||
try:
|
||||
module.run_command('apt-get update && apt-get install python-apt -y -q', use_unsafe_shell=True)
|
||||
module.run_command('apt-get update && apt-get install python-apt -y -q', use_unsafe_shell=True, check_rc=True)
|
||||
global apt, apt_pkg
|
||||
import apt
|
||||
import apt_pkg
|
||||
|
||||
Reference in New Issue
Block a user