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


                                   

                             
                             
 

                                         
       

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

- 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