summaryrefslogtreecommitdiffstats
path: root/roles/os_firewall/tasks/main.yml
blob: 99084cd3f63cf970dc35af05fda48798e4b8a752 (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_tasks: firewalld.yml
  when:
  - os_firewall_enabled | bool
  - os_firewall_use_firewalld | bool

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