Added smartctl_exporter for aya01 and fix for grafana
Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
This commit is contained in:
30
roles/smart_exporter/tasks/install.yml
Normal file
30
roles/smart_exporter/tasks/install.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- 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
|
||||
Reference in New Issue
Block a user