From a8ca48888fbb28c0a2ea92784713d192ea27793c Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 15 May 2013 00:50:28 -0400 Subject: [PATCH] apt now uses module function to find bin paths Signed-off-by: Brian Coca --- library/packaging/apt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/packaging/apt b/library/packaging/apt index 41380e63cc..b9b6652b3a 100644 --- a/library/packaging/apt +++ b/library/packaging/apt @@ -117,8 +117,6 @@ import os import datetime # APT related constants -APTITUDE_CMD = "aptitude" -APT_GET_CMD = "apt-get" APT_ENVVARS = "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical" DPKG_OPTIONS = '-o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"' APT_GET_ZERO = "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." @@ -265,6 +263,9 @@ def main(): except: module.fail_json(msg="Could not import python modules: apt, apt_pkg. Please install python-apt package.") + global APTITUDE_CMD = module.get_bin_path("aptitude", False) + global APT_GET_CMD = module.get_bin_path("apt-get") + p = module.params install_recommends = p['install_recommends']