32 lines
856 B
YAML
32 lines
856 B
YAML
---
|
|
- name: Install Prometheus Node exporter
|
|
apt:
|
|
name:
|
|
- prometheus-node-exporter
|
|
state: latest
|
|
update_cache: true
|
|
install_recommends: false # Do not install smartmontools
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
# TODO: add auth
|
|
#
|
|
# Create the file --web.config=/etc/node_exporter/config.yaml
|
|
# and add --web.config=/etc/node_exporter/config.yaml to
|
|
# the args in /etc/default/prometheus-node-exporter
|
|
|
|
- name: Setup the arguments for node-exporter
|
|
template:
|
|
src: prometheus-node-exporter
|
|
dest: /etc/default/prometheus-node-exporter
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
notify: Restart prometheus-node-exporter
|
|
vars:
|
|
args:
|
|
- name: web.listen-address
|
|
value: "{{ lan_address }}:9100"
|
|
# - name: web.config
|
|
# value: /etc/node_exporter/config.yaml
|