mirror of https://github.com/Aidaho12/haproxy-wi
parent
4d71d0d1f8
commit
8d211f487d
|
@ -148,7 +148,7 @@
|
|||
ignore_errors: yes
|
||||
no_log: True
|
||||
debugger: never
|
||||
when: ansible_facts.services["firewalld.service"]['state'] == "running"
|
||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ansible_facts.services["firewalld.service"]['state'] == "running"
|
||||
with_items: [ "{{ STAT_PORT }}", "{{ SOCK_PORT }}" ]
|
||||
|
||||
|
||||
|
|
|
@ -7,6 +7,11 @@
|
|||
ansible_port: "{{SSH_PORT}}"
|
||||
|
||||
|
||||
- name: collect facts about system services
|
||||
service_facts:
|
||||
register: services_state
|
||||
|
||||
|
||||
- name: Open stat port for firewalld
|
||||
firewalld:
|
||||
port: "9101/tcp"
|
||||
|
@ -22,7 +27,7 @@
|
|||
- name: Open stat port for iptables
|
||||
iptables:
|
||||
chain: INPUT
|
||||
destination_port: 9101
|
||||
destination_port: "9101"
|
||||
jump: ACCEPT
|
||||
protocol: tcp
|
||||
ignore_errors: yes
|
||||
|
|
|
@ -5,7 +5,12 @@
|
|||
- name: Set SSH port
|
||||
set_fact:
|
||||
ansible_port: "{{SSH_PORT}}"
|
||||
|
||||
|
||||
|
||||
- name: collect facts about system services
|
||||
service_facts:
|
||||
register: services_state
|
||||
|
||||
|
||||
- name: Open stat port for firewalld
|
||||
firewalld:
|
||||
|
@ -14,15 +19,13 @@
|
|||
permanent: yes
|
||||
immediate: yes
|
||||
ignore_errors: yes
|
||||
no_log: True
|
||||
debugger: never
|
||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ansible_facts.services["firewalld.service"]['state'] == "running"
|
||||
|
||||
|
||||
- name: Open stat port for iptables
|
||||
iptables:
|
||||
chain: INPUT
|
||||
destination_port: 9113
|
||||
destination_port: "9113"
|
||||
jump: ACCEPT
|
||||
protocol: tcp
|
||||
ignore_errors: yes
|
||||
|
|
Loading…
Reference in New Issue