From 0122f086b2dc3f8c952a7a1cae13982aa37491ad Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 31 Jul 2026 11:36:11 -0700 Subject: [PATCH] Just remove the metasploit package, don't do autoremove since it does not work in non-interactive shells very well. --- tasks/general/software/metasploit.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tasks/general/software/metasploit.yml b/tasks/general/software/metasploit.yml index a206fbe..3dcbf40 100644 --- a/tasks/general/software/metasploit.yml +++ b/tasks/general/software/metasploit.yml @@ -44,11 +44,10 @@ and not metasploit_status.stat.exists and pentesting == false -- name: General | Software | Metasploit | Remove (APT) - shell: "{{ item }}" - loop: - - "apt purge metasploit-framework" - - "apt autoremove --purge" - when: ansible_system in ("Linux") and ansible_pkg_mgr == "apt" +- name: General | Software | Metasploit | Remove + package: + name: "metasploit-framework" + state: absent + when: ansible_system in ("Linux") and metasploit_status.stat.exists and pentesting == false