#SPDX-License-Identifier: MIT-0 --- - name: Downloading node-exporter ansible.builtin.unarchive: src: "{{ NE_download_url }}" dest: /tmp mode: 0755 remote_src: yes - name: Copying the node_exporter bin file ansible.builtin.copy: src: "/tmp/node_exporter-{{ NE_version }}.linux-{{NE_arch }}/node_exporter" dest: "{{ NE_bin_path }}" mode: 0755 remote_src: yes - name: "Installing node-exporter" ansible.builtin.user: name: "nodeusr" shell: "/bin/false" create_home: false state: present - name: I copy the node_exporter.service file ansible.builtin.template: src: node_exporter.service.j2 dest: /etc/systemd/system/node_exporter.service mode: 0644 - name: re-reading the systemd configuration ansible.builtin.systemd_service: daemon_reload: true - name: Starting node_exoporter.service ansible.builtin.systemd_service: name: node_exporter.service state: "{{ NE_state }}" enabled: "{{ NE_enabled }}"