Adding variable for managing firewall ports
This commit is contained in:
parent
c5283b1487
commit
d038403979
3 changed files with 24 additions and 26 deletions
|
@ -9,6 +9,15 @@ haproxy_shared_ip: ""
|
|||
haproxy_shared_ip_subnet: "/24"
|
||||
haproxy_shared_virtual_router_id: 25
|
||||
haproxy_keepalived_process_weight: 10
|
||||
haproxy_listen_ports:
|
||||
- port : 22
|
||||
protocol: tcp
|
||||
- port : 80
|
||||
protocol: tcp
|
||||
- port : 443
|
||||
protocol: tcp
|
||||
- port : 9999
|
||||
protocol: tcp
|
||||
|
||||
# Set per host
|
||||
|
||||
|
|
|
@ -110,19 +110,7 @@
|
|||
permanent: yes
|
||||
immediate: yes
|
||||
state: enabled
|
||||
with_items:
|
||||
- {port: "22", protocol: "tcp"}
|
||||
- {port: "80", protocol: "tcp"}
|
||||
- {port: "443", protocol: "tcp"}
|
||||
notify: reload firewalld
|
||||
become: yes
|
||||
|
||||
- name: Enable firewall ports for haproxy stats
|
||||
firewalld:
|
||||
port: "9999/tcp"
|
||||
permanent: yes
|
||||
immediate: yes
|
||||
state: enabled
|
||||
loop: "{{ haproxy_listen_ports }}"
|
||||
notify: reload firewalld
|
||||
become: yes
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue