# platform = multi_platform_all
# reboot = false
# strategy = disable
# complexity = low
# disruption = low
- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - disable_strategy
  - low_complexity
  - low_disruption
  - medium_severity
  - no_reboot_needed
  - package_ufw_removed
- (xccdf-var var_network_filtering_service)

- name: Ensure ufw is removed
  ansible.builtin.package:
    name: ufw
    state: absent
  when:
  - '"linux-base" in ansible_facts.packages'
  - var_network_filtering_service != "ufw"
  tags:
  - disable_strategy
  - low_complexity
  - low_disruption
  - medium_severity
  - no_reboot_needed
  - package_ufw_removed
