Merge pull request #4617 from resmo/feature/python-apt

apt: autoinstall python-apt if apt or apt_pkg is not available
reviewable/pr18780/r1
jctanner 11 years ago
commit f58bbd5913

@ -344,6 +344,12 @@ def main():
)
if not HAS_PYTHON_APT:
try:
module.run_command('apt-get install python-apt -y -q')
global apt, apt_pkg
import apt
import apt_pkg
except:
module.fail_json(msg="Could not import python modules: apt, apt_pkg. Please install python-apt package.")
global APTITUDE_CMD

Loading…
Cancel
Save