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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user