Ansible-Roles/roles/firewall/vars/main.yml
2026-05-08 22:12:36 +03:00

47 lines
1.7 KiB
YAML

---
# ansible_facts required by the role
__firewall_required_facts:
- distribution_major_version
- distribution
- service_mgr
# the subsets of ansible_facts that need to be gathered in case any of the
# facts in required_facts is missing; see the documentation of
# the 'gather_subset' parameter of the 'setup' module
__firewall_required_facts_subsets: "{{ ['!all', '!min'] + __firewall_required_facts }}"
__firewall_packages_base: [firewalld]
# NetworkManager is required for the interface_pci_id functionality
# python-ipaddress is required for the ipaddress module
# These are built-in (?) on EL8 and later
__firewall_packages_extra: "{{ ['NetworkManager', 'python-ipaddress'] if __firewall_is_rh_distro and ansible_facts['distribution_major_version'] | int < 8 else []
}}"
# This is the package providing the default /etc/firewall/firewalld.conf
__firewall_package_with_conf: firewalld
__firewall_service: firewalld
__firewall_conflicting_services:
- nftables
- iptables
- ufw
# BEGIN - DO NOT EDIT THIS BLOCK - rh distros variables
# Ansible distribution identifiers that the role treats like RHEL
__firewall_rh_distros:
- AlmaLinux
- CentOS
- RedHat
- Rocky
# Same as above but includes Fedora
__firewall_rh_distros_fedora: "{{ __firewall_rh_distros + ['Fedora'] }}"
# Use this in conditionals to check if distro is Red Hat or clone
__firewall_is_rh_distro: "{{ ansible_facts['distribution'] in __firewall_rh_distros }}"
# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
__firewall_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __firewall_rh_distros_fedora }}"
# END - DO NOT EDIT THIS BLOCK - rh distros variables