--- - name: install prometheus node exporter apt: name: prometheus-node-exporter state: present - name: set node exporter config lineinfile: path: /etc/default/prometheus-node-exporter regexp: '^ARGS=' line: ARGS="--web.listen-address=10.80.0.2:9100" notify: restart-node-exporter