mirror of https://github.com/Aidaho12/haproxy-wi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
865 B
39 lines
865 B
4 years ago
|
- hosts: "{{ variable_host }}"
|
||
|
become: yes
|
||
|
become_method: sudo
|
||
|
tasks:
|
||
|
- 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:
|
||
|
port: "9100/tcp"
|
||
|
state: enabled
|
||
|
permanent: yes
|
||
|
immediate: yes
|
||
|
ignore_errors: yes
|
||
|
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: "9100"
|
||
|
jump: ACCEPT
|
||
|
protocol: tcp
|
||
|
ignore_errors: yes
|
||
|
|
||
|
|
||
|
roles:
|
||
|
- role: cloudalchemy.node_exporter
|
||
|
environment:
|
||
|
http_proxy: "{{PROXY}}"
|
||
|
https_proxy: "{{PROXY}}"
|