---

### tags:

- name: "Ensure prometheus-node-exporter ist installed"
  apt:
    pkg:
      - prometheus-node-exporter
      - prometheus-node-exporter-collectors

- name: "Setup prometheus-node-exporter interface bind"
  lineinfile:
    path: /etc/default/prometheus-node-exporter
    regex: "^ARGS="
    line: "ARGS=\"--web.listen-address='{{ stage_private_server_ip }}:{{ monitor_port_system }}'\""
  notify: restart node-exporter

- name: "Ensure prometheus-node-exporter is running"
  service:
    name: prometheus-node-exporter
    state: started
