2023-04-27 01:05:24 +02:00
|
|
|
---
|
2024-09-19 23:10:00 +02:00
|
|
|
- name: Download/Extract "{{ download_url }}"
|
2023-04-27 01:05:24 +02:00
|
|
|
unarchive:
|
2024-09-19 23:10:00 +02:00
|
|
|
src: "{{ download_url }}"
|
2023-05-11 15:09:52 +02:00
|
|
|
dest: /tmp/
|
|
|
|
remote_src: true
|
|
|
|
mode: 755
|
|
|
|
|
|
|
|
- name: Move node_exporter into path
|
|
|
|
copy:
|
2024-10-08 11:17:03 +02:00
|
|
|
src: "/tmp/node_exporter-{{ tag }}.linux-{{ go_arch }}/node_exporter"
|
2024-09-19 23:10:00 +02:00
|
|
|
dest: "{{ bin_path }}"
|
2023-05-11 15:09:52 +02:00
|
|
|
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
|
|
|
|
become: true
|