--- - name: Download/Extract "{{ node_exporter_download_url }}" unarchive: src: "{{ node_exporter_download_url }}" dest: /tmp/ remote_src: true mode: 755 - name: Move node_exporter into path copy: src: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter" dest: "{{ node_exporter.bin_path }}" mode: 755 remote_src: true become: true - name: Create node_exporter user. user: name: node_exporter shell: /sbin/nologin state: present become: true - name: Copy the node_exporter systemd unit file. template: src: node_exporter.service.j2 dest: /etc/systemd/system/node_exporter.service mode: 0644 register: node_exporter_service become: true