add iptables rule
This commit is contained in:
parent
87c0ba81bb
commit
4d02357c78
4
defaults/main.yml
Normal file
4
defaults/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
nginx_open_ports:
|
||||
- 80
|
||||
- 443
|
@ -35,3 +35,10 @@
|
||||
- header.conf
|
||||
notify:
|
||||
- nginx_restart
|
||||
|
||||
- name: Open ports in iptables
|
||||
iptables_raw:
|
||||
name: allow_nginx_ports
|
||||
state: present
|
||||
rules: '-A INPUT -p tcp -m multiport --dports {{ nginx_open_ports|join(",") }} -j ACCEPT'
|
||||
tags: iptables
|
||||
|
Loading…
Reference in New Issue
Block a user