summaryrefslogtreecommitdiffstats
path: root/roles/os_firewall/tasks/main.yml
blob: c477d386cd8548860bf362ac44e6ae229d5722db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
- name: Detecting Atomic Host Operating System
  stat:
    path: /run/ostree-booted
  register: r_os_firewall_ostree_booted

- name: Set fact r_os_firewall_is_atomic
  set_fact:
    r_os_firewall_is_atomic: "{{ r_os_firewall_ostree_booted.stat.exists }}"

- include: firewalld.yml
  when:
  - os_firewall_enabled | bool
  - os_firewall_use_firewalld | bool

- include: iptables.yml
  when:
  - os_firewall_enabled | bool
  - not os_firewall_use_firewalld | bool