From 8e37a2bec9b805a677c5c1d60070cbe1d88e5c57 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 19 Jun 2013 08:37:14 +0200 Subject: [PATCH] Fix purging of packages A small error in the reuse of a variable caused packages to never get purged. This commit fixes that. Signed-off-by: martin f. krafft --- library/packaging/apt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/packaging/apt b/library/packaging/apt index d0e86e8082..37856074c9 100644 --- a/library/packaging/apt +++ b/library/packaging/apt @@ -210,9 +210,10 @@ def remove(m, pkgspec, cache, purge=False): if len(packages) == 0: m.exit_json(changed=False) else: - purge = '' if purge: purge = '--purge' + else: + purge = '' cmd = "%s -q -y %s remove %s" % (APT_GET_CMD, purge,packages) if m.check_mode: