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 - sed
- grep - grep
- net-tools - net-tools

View file

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

View file

@ -10,3 +10,6 @@ udp_authorized_ports: []
# All incoming authorized IP (all ports and all protocols) # All incoming authorized IP (all ports and all protocols)
ip_authorized: [] 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 # Main tasks file for client_iptables
- import_tasks: package.yml - import_tasks: package.yml
when: configure_iptables
- import_tasks: iptables.yml - import_tasks: iptables.yml
when: configure_iptables