Add condition to iptables role

This commit is contained in:
Nemo 2020-07-11 16:10:53 +02:00
parent ea525cc23b
commit 591eda90e1
4 changed files with 8 additions and 1 deletions

View File

@ -22,4 +22,3 @@ tools_package:
- sed
- grep
- net-tools

View File

@ -24,6 +24,9 @@ All variables and default values are defined in `defaults/main.yml` :
# All incoming authorized IP
ip_authorized: []
# Set to false to avoid iptables configure with this role
configure_iptables: true
Dependencies
------------

View File

@ -10,3 +10,6 @@ udp_authorized_ports: []
# All incoming authorized IP (all ports and all protocols)
ip_authorized: []
# Set to false to avoid iptables configure with this role
configure_iptables: true

View File

@ -2,4 +2,6 @@
# Main tasks file for client_iptables
- import_tasks: package.yml
when: configure_iptables
- import_tasks: iptables.yml
when: configure_iptables