---
# tasks file for iptables

- name: Install Iptables
  include_tasks: install.yml

- name: Clean Config
  include_tasks: clean.yml
  loop: "{{ iptables_ip_versions }}"
  loop_control:
    loop_var: ip_version
  when: iptables_do_clean

- name: Base Config
  include_tasks: base.yml
  loop: "{{ iptables_ip_versions }}"
  loop_control:
    loop_var: ip_version

- name: Custom Config
  include_tasks: custom.yml
  loop: "{{ iptables_ip_versions }}"
  loop_control:
    loop_var: ip_version

- name: Apply Policy
  include_tasks: policy.yml
  loop: "{{ iptables_ip_versions }}"
  loop_control:
    loop_var: ip_version

- name: Save Rule
  include_tasks: save.yml
  loop: "{{ iptables_ip_versions }}"
  when: iptables_do_save

- name: Enable Service
  include_tasks: enable.yml
