aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/firewall/tasks/main.yml
blob: 82584e234ed545738e98cf5cfec43154730556b9 (plain) (tree)
1
2
3
4
5
6
7
8
9





                                   
                                         
       
                                                                       
 
                           
                                      
- name: Install iptables-persistent
  become: true
  ansible.builtin.apt:
    install_recommends: false
    name: iptables-persistent
    state: present

- name: Configure rule files
  ansible.builtin.include_tasks: file.yml
  loop:
    - {src: rules.v4.j2, dest: /etc/iptables/rules.v4, tool: iptables}
    - {src: rules.v6.j2, dest: /etc/iptables/rules.v6, tool: ip6tables}

- name: Reboot if necessary
  ansible.builtin.meta: flush_handlers