# platform = multi_platform_all
# reboot = false
# strategy = enable
# complexity = low
# disruption = low
- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - NIST-800-53-AC-4
  - NIST-800-53-CA-3(5)
  - NIST-800-53-CM-6(a)
  - NIST-800-53-CM-7(b)
  - NIST-800-53-SC-7(21)
  - enable_strategy
  - low_complexity
  - low_disruption
  - medium_severity
  - no_reboot_needed
  - service_ip6tables_enabled

- name: Verify ip6tables Enabled if Using IPv6 - Enable service ip6tables
  block:

  - name: Gather the package facts
    ansible.builtin.package_facts:
      manager: auto

  - name: Verify ip6tables Enabled if Using IPv6 - Enable Service ip6tables
    ansible.builtin.systemd:
      name: ip6tables
      enabled: true
      state: started
      masked: false
    when:
    - '"iptables-ipv6" in ansible_facts.packages'
  tags:
  - NIST-800-53-AC-4
  - NIST-800-53-CA-3(5)
  - NIST-800-53-CM-6(a)
  - NIST-800-53-CM-7(b)
  - NIST-800-53-SC-7(21)
  - enable_strategy
  - low_complexity
  - low_disruption
  - medium_severity
  - no_reboot_needed
  - service_ip6tables_enabled
  - special_service_block
  when: '"linux-base" in ansible_facts.packages'
