Just remove the metasploit package, don't do autoremove since it does not work in non-interactive shells very well.

This commit is contained in:
2026-07-31 11:36:11 -07:00
parent 0b878674d3
commit 0122f086b2
+5 -6
View File
@@ -44,11 +44,10 @@
and not metasploit_status.stat.exists and not metasploit_status.stat.exists
and pentesting == false and pentesting == false
- name: General | Software | Metasploit | Remove (APT) - name: General | Software | Metasploit | Remove
shell: "{{ item }}" package:
loop: name: "metasploit-framework"
- "apt purge metasploit-framework" state: absent
- "apt autoremove --purge" when: ansible_system in ("Linux")
when: ansible_system in ("Linux") and ansible_pkg_mgr == "apt"
and metasploit_status.stat.exists and metasploit_status.stat.exists
and pentesting == false and pentesting == false