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