mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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 <madduck@madduck.net>
This commit is contained in:
parent
fc2d25eb82
commit
8e37a2bec9
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue