--- - name: Add the user 'prometheus' for node_exporter ansible.builtin.user: name: prometheus shell: /usr/sbin/nologin append: yes home: /var/lib/prometheus - name: Ensure {{ node_exporter_package }} installed apt: name: "{{ node_exporter_package }}" state: present - name: Enable and start node_exporter systemd: name: "{{ node_exporter_unit_name }}" state: started enabled: yes masked: no daemon_reload: yes