haproxy-wi/app/scripts/ansible/roles/haproxy_exporter.yml

18 lines
419 B
YAML

- hosts: all
become: yes
become_method: sudo
tasks:
- name: Open stat port for iptables
iptables:
chain: INPUT
destination_port: "9101"
jump: ACCEPT
protocol: tcp
ignore_errors: yes
roles:
- role: haproxy_exporter
vars:
haproxy_exporter_options: ['--haproxy.scrape-uri=http://{{STATS_USER}}:{{STATS_PASS}}@{{ansible_host}}:{{STAT_PORT}}/{{STAT_PAGE}};csv']