summaryrefslogtreecommitdiffstats
path: root/ansible/roles/firewall/tasks/firewall-disable.yml
blob: af8d4a1e9a74b00076bfe2c14ad99cb19dfb741c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
- name: Get installed packages list
  package_facts:
    manager: "auto"

- name: Stop and disable default OS firewall if exists
  service:
    name: "{{ firewall.package_name[ansible_facts.os_family] }}"
    state: stopped
    enabled: no
  when: firewall.package_name[ansible_facts.os_family] in ansible_facts.packages

- name: Flush iptables
  iptables:
    flush: true
  tags: molecule-idempotence-notest