2024-02-04 07:28:17 +00:00
|
|
|
- hosts: all
|
2020-03-27 21:16:04 +00:00
|
|
|
become: yes
|
|
|
|
become_method: sudo
|
|
|
|
tasks:
|
2020-04-07 18:16:12 +00:00
|
|
|
- name: Open stat port for iptables
|
|
|
|
iptables:
|
|
|
|
chain: INPUT
|
2020-04-08 16:56:51 +00:00
|
|
|
destination_port: "9113"
|
2020-04-07 18:16:12 +00:00
|
|
|
jump: ACCEPT
|
|
|
|
protocol: tcp
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
|
2020-03-27 21:16:04 +00:00
|
|
|
roles:
|
2021-12-20 06:56:56 +00:00
|
|
|
- role: nginx_exporter
|
2020-03-27 21:16:04 +00:00
|
|
|
environment:
|
|
|
|
http_proxy: "{{PROXY}}"
|
|
|
|
https_proxy: "{{PROXY}}"
|
|
|
|
vars:
|
2024-02-04 07:28:17 +00:00
|
|
|
nginx_exporter_options: ['-nginx.scrape-uri http://{{STATS_USER}}:{{STATS_PASS}}@{{ansible_host}}:{{STAT_PORT}}/{{STAT_PAGE}}']
|