Jason DeTiberus cef42e2541 update tests and flake8/pylint fixes %!s(int64=8) %!d(string=hai) anos
..
defaults 507a69ed1d Default os_firewall_use_firewalld to false in os_firewall and remove overrides. %!s(int64=9) %!d(string=hai) anos
library cef42e2541 update tests and flake8/pylint fixes %!s(int64=8) %!d(string=hai) anos
meta bda2edf4cb Updating docs for Ansible 2.2 requirements %!s(int64=8) %!d(string=hai) anos
tasks c1ad62d179 Systemd `systemctl show` workaround %!s(int64=8) %!d(string=hai) anos
README.md bda2edf4cb Updating docs for Ansible 2.2 requirements %!s(int64=8) %!d(string=hai) anos

README.md

OS Firewall

OS Firewall manages firewalld and iptables firewall settings for a minimal use case (Adding/Removing rules based on protocol and port number).

Requirements

Ansible 2.2

Role Variables

Name Default
os_firewall_use_firewalld False If false, use iptables
os_firewall_allow [] List of service,port mappings to allow
os_firewall_deny [] List of service, port mappings to deny

Dependencies

None.

Example Playbook

Use iptables and open tcp ports 80 and 443:

---
- hosts: servers
  vars:
    os_firewall_allow:
    - service: httpd
      port: 80/tcp
    - service: https
      port: 443/tcp
  roles:
  - os_firewall

Use firewalld and open tcp port 443 and close previously open tcp port 80:

---
- hosts: servers
  vars:
    os_firewall_use_firewalld: true
    os_firewall_allow:
    - service: https
      port: 443/tcp
    os_firewall_deny:
    - service: httpd
      port: 80/tcp
  roles:
  - os_firewall

License

Apache License, Version 2.0

Author Information

Jason DeTiberus - jdetiber@redhat.com