---
- name: restart node_exporter
  service:
    name: prometheus
    state: restarted
    enabled: yes
  become: yes

- name: systemd restart node_exporter
  systemd:
    name: prometheus
    state: restarted
    enabled: yes
    daemon_reload: yes
  become: yes
